Sha256: 6e4479261688eb404dc63ec46d948a63a1b9a59422c059bb58d95948281638d2
Contents?: true
Size: 788 Bytes
Versions: 5
Compression:
Stored size: 788 Bytes
Contents
module Coco module App 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
Version data entries
5 entries across 5 versions & 1 rubygems