Sha256: 37da601775285efbbc5275a18e9a00b7377398b735537de71f400960d2af1286

Contents?: true

Size: 437 Bytes

Versions: 66

Compression:

Stored size: 437 Bytes

Contents

module Lookbook
  class Tabs::Tab::Component < Lookbook::BaseComponent
    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 || @name.titleize
    end
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
lookbook-2.3.4 app/components/lookbook/tabs/tab/component.rb
lookbook-2.3.3 app/components/lookbook/tabs/tab/component.rb
lookbook-2.3.2 app/components/lookbook/tabs/tab/component.rb
lookbook-2.3.0 app/components/lookbook/tabs/tab/component.rb
lookbook-2.2.2 app/components/lookbook/tabs/tab/component.rb
lookbook-2.2.1 app/components/lookbook/tabs/tab/component.rb
lookbook-2.2.0 app/components/lookbook/tabs/tab/component.rb
lookbook-2.1.1 app/components/lookbook/tabs/tab/component.rb
lookbook-2.1.0 app/components/lookbook/tabs/tab/component.rb
lookbook-2.0.5 app/components/lookbook/tabs/tab/component.rb
lookbook-2.0.4 app/components/lookbook/tabs/tab/component.rb
lookbook-2.0.3 app/components/lookbook/tabs/tab/component.rb
lookbook-2.0.2 app/components/lookbook/tabs/tab/component.rb
lookbook-2.0.1 app/components/lookbook/tabs/tab/component.rb
lookbook-2.0.0 app/components/lookbook/tabs/tab/component.rb
lookbook-2.0.0.rc.3 app/components/lookbook/tabs/tab/component.rb
lookbook-1.5.5 app/components/lookbook/tabs/tab/component.rb
lookbook-1.5.4 app/components/lookbook/tabs/tab/component.rb
lookbook-2.0.0.rc.2 app/components/lookbook/tabs/tab/component.rb
lookbook-2.0.0.rc.1 app/components/lookbook/tabs/tab/component.rb