Sha256: 88b088939618a2a0d3bdb4765125f996b76276a72d24a7735ca8c60b16ca7767

Contents?: true

Size: 501 Bytes

Versions: 20

Compression:

Stored size: 501 Bytes

Contents

# frozen_string_literal: true

module Bs5
  class CloseButtonComponent < ViewComponent::Base
    attr_reader :data

    def initialize(disabled: false, white: false, data: nil)
      @disabled = disabled
      @white = white
      @data = data
    end

    private

    def white?
      @white
    end

    def disabled?
      @disabled
    end

    def component_class
      class_names = ['btn-close']
      class_names << %w[btn-close-white] if white?
      class_names.join(' ')
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
bs5-0.0.24 app/components/bs5/close_button_component.rb
bs5-0.0.23 app/components/bs5/close_button_component.rb
bs5-0.0.22 app/components/bs5/close_button_component.rb
bs5-0.0.21 app/components/bs5/close_button_component.rb
bs5-0.0.20 app/components/bs5/close_button_component.rb
bs5-0.0.19 app/components/bs5/close_button_component.rb
bs5-0.0.18 app/components/bs5/close_button_component.rb
bs5-0.0.17 app/components/bs5/close_button_component.rb
bs5-0.0.16 app/components/bs5/close_button_component.rb
bs5-0.0.15 app/components/bs5/close_button_component.rb
bs5-0.0.14 app/components/bs5/close_button_component.rb
bs5-0.0.13 app/components/bs5/close_button_component.rb
bs5-0.0.12 app/components/bs5/close_button_component.rb
bs5-0.0.11 app/components/bs5/close_button_component.rb
bs5-0.0.10 app/components/bs5/close_button_component.rb
bs5-0.0.9 app/components/bs5/close_button_component.rb
bs5-0.0.8 app/components/bs5/close_button_component.rb
bs5-0.0.7 app/components/bs5/close_button_component.rb
bs5-0.0.6 app/components/bs5/close_button_component.rb
bs5-0.0.5 app/components/bs5/close_button_component.rb