Class: Voom::Presenters::DSL::Components::Menu::Label

Inherits:
Item show all
Defined in:
lib/voom/presenters/dsl/components/menu.rb

Instance Attribute Summary

Attributes inherited from Item

#disabled, #selected, #text

Attributes included from BaseMenuItem

#color, #position, #size

Attributes inherited from EventBase

#event_parent_id

Attributes included from Voom::Presenters::DSL::Components::Mixins::Event

#events

Attributes inherited from Base

#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type

Instance Method Summary collapse

Methods inherited from Item

#icon

Methods included from Voom::Presenters::DSL::Components::Mixins::Typography

#blank, #body, #body2, #caption, #headline, #headline1, #headline2, #headline3, #headline4, #headline5, #headline6, #link, #overline, #page_title, #separator, #subtitle, #subtitle2, #text, #title

Methods included from Voom::Presenters::DSL::Components::Mixins::Append

#<<, #yield_to

Methods included from Voom::Presenters::DSL::Components::Mixins::Tooltips

#tooltip

Methods included from Voom::Presenters::DSL::Components::Mixins::Event

#event

Methods inherited from Base

#expand!

Methods included from Pluggable

#include_plugins, #plugin, #plugin_module

Methods included from Voom::Presenters::DSL::Components::Mixins::YieldTo

#yield_to

Methods included from Serializer

#to_hash

Methods included from Lockable

#locked?

Constructor Details

#initialize(**attribs, &block) ⇒ Label

Returns a new instance of Label.



101
102
103
104
105
106
# File 'lib/voom/presenters/dsl/components/menu.rb', line 101

def initialize(**attribs, &block)
  super(type: :label, **attribs, &block)
  @position = validate_position(attribs.delete(:position) { :top })
  @size = validate_size(attribs.delete(:size) { :normal })
  @color = attribs.delete(:color) { :primary }
end