Class: LightningUiKit::CardComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- LightningUiKit::CardComponent
- Defined in:
- app/components/lightning_ui_kit/card_component.rb
Instance Method Summary collapse
- #classes ⇒ Object
- #data ⇒ Object
-
#initialize(**options) ⇒ CardComponent
constructor
A new instance of CardComponent.
Methods inherited from BaseComponent
Methods included from HeroiconHelper
Constructor Details
#initialize(**options) ⇒ CardComponent
Returns a new instance of CardComponent.
8 9 10 |
# File 'app/components/lightning_ui_kit/card_component.rb', line 8 def initialize(**) @options = end |
Instance Method Details
#classes ⇒ Object
12 13 14 15 16 17 |
# File 'app/components/lightning_ui_kit/card_component.rb', line 12 def classes merge_classes([ "lui:flex lui:flex-col lui:gap-6 lui:rounded-xl lui:border lui:border-border lui:bg-surface lui:py-6 lui:text-foreground lui:shadow-sm", @options[:class] ].compact.join(" ")) end |
#data ⇒ Object
19 20 21 |
# File 'app/components/lightning_ui_kit/card_component.rb', line 19 def data @options[:data] || {} end |