Class: Matestack::Ui::Bootstrap::Components::Dropdown
- Inherits:
-
BaseVueJsComponent
- Object
- VueJsComponent
- BaseVueJsComponent
- Matestack::Ui::Bootstrap::Components::Dropdown
- Defined in:
- lib/matestack/ui/bootstrap/components/dropdown.rb
Instance Method Summary collapse
Instance Method Details
#prepare ⇒ Object
16 17 18 |
# File 'lib/matestack/ui/bootstrap/components/dropdown.rb', line 16 def prepare @bs_menu = context..is_a?(Hash) ? context. : { items: context. } end |
#response ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/matestack/ui/bootstrap/components/dropdown.rb', line 20 def response div dropdown_attributes do split_btn_partial if slots && slots[:split_btn] bs_btn btn_attributes unless slots && slots[:split_btn] ul do unless @bs_menu[:items].blank? yield if block_given? end end end |