Class: Bulma::NotificationComponent
- Defined in:
- app/components/bulma/notification_component.rb
Instance Method Summary collapse
- #classes ⇒ Object
-
#initialize(color: nil, light: false) ⇒ NotificationComponent
constructor
A new instance of NotificationComponent.
Constructor Details
#initialize(color: nil, light: false) ⇒ NotificationComponent
Returns a new instance of NotificationComponent.
7 8 9 10 |
# File 'app/components/bulma/notification_component.rb', line 7 def initialize(color: nil, light: false) @color = color @light = light end |
Instance Method Details
#classes ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/components/bulma/notification_component.rb', line 12 def classes class_names( "notification", "is-#{@color}" => @color.present?, "is-light" => @light ) end |