app/components/lookbook/tabs/tab/component.rb in lookbook-1.0.0.beta.0 vs app/components/lookbook/tabs/tab/component.rb in lookbook-1.0.0.beta.1
- old
+ new
@@ -1,16 +1,17 @@
module Lookbook
class Tabs::Tab::Component < Lookbook::Component
- def initialize(ref:, label: nil, hotkey: nil, disabled: nil, position: 0, **html_attrs)
- @ref = ref
+ def initialize(name:, label: nil, hotkey: nil, disabled: nil, position: 0, theme: :toolbar, **html_attrs)
+ @name = name
@label = label
@hotkey = hotkey
@disabled = disabled
@position = position
+ @theme = theme
super(**html_attrs)
end
def label
- @label.presence || content
+ @label.presence || content || @name.titleize
end
end
end