Sha256: 33a2ed5fc45d9fe75bd98e7fe1c62f3d9ffe7d1e9ecdd0022fc8cffd9ff639f9

Contents?: true

Size: 862 Bytes

Versions: 23

Compression:

Stored size: 862 Bytes

Contents

module Coco
  module App
    module Blocks
      class NavDrawer < Coco::Component
        renders_many :items, types: {
          html: ->(&block) { block.call },
          divider: ->(&block) { tag.div class: "nav-drawer-divider" },
          heading: ->(text, **kwargs, &block) do
            tag.h4(text, class: "nav-drawer-heading")
          end,
          button: ->(*args, **kwargs, &block) do
            coco_button(*args, **kwargs, theme: nil, size: :md, fit: :full, class: "nav-drawer-button", &block)
          end
        }

        def with_divider(...)
          with_item_divider(...)
        end

        def with_html(...)
          with_item_html(...)
        end

        def with_button(...)
          with_item_button(...)
        end

        def with_heading(...)
          with_item_heading(...)
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
coveragebook_components-0.12.2 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.12.1 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.12.0 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.11.0 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.10.1.beta.2 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.10.1.beta.1 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.10.1.beta.0 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.10.0 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.9.1 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.9.0 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.8.9 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.8.8 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.8.7 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.8.6 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.8.5 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.8.4 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.8.3 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.8.2 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.8.1 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb
coveragebook_components-0.8.0 app/components/coco/app/blocks/nav_drawer/nav_drawer.rb