Class: Bulma::ButtonsComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/bulma/buttons_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(attached: false, align: nil) ⇒ ButtonsComponent

Returns a new instance of ButtonsComponent.



7
8
9
10
# File 'app/components/bulma/buttons_component.rb', line 7

def initialize(attached: false, align: nil)
  @attached = attached
  @align = align
end

Instance Method Details

#classesObject



12
13
14
# File 'app/components/bulma/buttons_component.rb', line 12

def classes
  class_names("buttons", "has-addons" => @attached, "is-#{@align}" => @align.present?)
end