Class: DaisyUI::TabWithoutContent

Inherits:
Base
  • Object
show all
Defined in:
lib/daisy_ui/tab_without_content.rb

Constant Summary

Constants inherited from Base

Base::BOOLS, Base::COLOR_MODIFIERS

Instance Method Summary collapse

Methods inherited from Base

inherited, register_modifiers

Constructor Details

#initialize(label: nil) ⇒ TabWithoutContent

Returns a new instance of TabWithoutContent.



8
9
10
11
# File 'lib/daisy_ui/tab_without_content.rb', line 8

def initialize(*, label: nil, **)
  super(*, **)
  @label = label
end

Instance Method Details

#view_templateObject



13
14
15
16
17
18
19
# File 'lib/daisy_ui/tab_without_content.rb', line 13

def view_template(&)
  attrs = attributes.dup
  # Remove label from attributes if it was passed as a keyword arg
  attrs.delete(:label)

  div role: :tab, class: classes, **attrs, &
end