Class: Bulma::DeleteComponent

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

Instance Method Summary collapse

Constructor Details

#initialize(size: nil) ⇒ DeleteComponent

Returns a new instance of DeleteComponent.



5
6
7
# File 'app/components/bulma/delete_component.rb', line 5

def initialize(size: nil)
  @size = size
end

Instance Method Details

#callObject



9
10
11
12
13
14
# File 'app/components/bulma/delete_component.rb', line 9

def call
   :button, nil, class: class_names(
    "delete",
    "is-#{@size}" => @size.present?
  )
end