Sha256: 5bb8f4ff65961d32d70dc3a575baac51760f7f7f251b8dc79141254d7695f112
Contents?: true
Size: 945 Bytes
Versions: 34
Compression:
Stored size: 945 Bytes
Contents
<%= clazz = Class.new(ViewComponent::Base) do def self.name "CustomComponent" end def call render(Primer::OpenProject::SidePanel::Section.new) do |section| section.with_title { "My custom component" } section.with_counter(count: 5) section.with_description do "Some text here" end section.with_action_icon(icon: :pencil, 'aria-label': 'Edit') section.with_footer_button(tag: :a, href: '#') do |button| button.with_leading_visual_icon(icon: :pencil) "Additional action" end "Section content" end end end render(Primer::Alpha::Layout.new) do |component| component.with_main do "Main content" end component.with_sidebar(row_placement: :start, col_placement: :end) do render(Primer::OpenProject::SidePanel.new) do |panel| panel.with_section(clazz.new) end end end %>
Version data entries
34 entries across 34 versions & 1 rubygems