Class: Protos::Menu

Inherits:
Component show all
Defined in:
lib/protos/menu.rb,
lib/protos/menu/item.rb

Defined Under Namespace

Classes: Item

Constant Summary collapse

Directions =

DOCS: A menu of links or actions. daisyui.com/components/menu/

Types::Coercible::Symbol.enum(:vertical, :horizontal)
Sizes =
Types::Coercible::Symbol.enum(:xs, :sm, :md, :lg, :xl)
DIRECTIONS =
{
  vertical: "",
  horizontal: "menu-horizontal"
}.freeze
SIZES =
{
  xs: "menu-xs",
  sm: "menu-sm",
  md: "menu-md",
  lg: "menu-lg",
  xl: "menu-xl"
}.freeze

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#itemObject



40
41
42
# File 'lib/protos/menu.rb', line 40

def item(...)
  render Item.new(...)
end

#view_templateObject



36
37
38
# File 'lib/protos/menu.rb', line 36

def view_template(&)
  ul(**attrs, &)
end