Class: Flowbite::Card
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Flowbite::Card
- Defined in:
- app/components/flowbite/card.rb,
app/components/flowbite/card/title.rb
Overview
Renders a card element.
Defined Under Namespace
Classes: Title
Class Method Summary collapse
- .classes(state: :default, style: :default) ⇒ Object
-
.styles ⇒ Object
rubocop:disable Layout/LineLength.
Instance Method Summary collapse
-
#initialize(class: [], options: {}, title: {}) ⇒ Card
constructor
A new instance of Card.
Constructor Details
#initialize(class: [], options: {}, title: {}) ⇒ Card
Returns a new instance of Card.
43 44 45 46 47 |
# File 'app/components/flowbite/card.rb', line 43 def initialize(class: [], options: {}, title: {}) @class = Array(binding.local_variable_get(:class)) || [] @options = || {} @title = title end |
Class Method Details
.classes(state: :default, style: :default) ⇒ Object
11 12 13 14 |
# File 'app/components/flowbite/card.rb', line 11 def classes(state: :default, style: :default) style = styles.fetch(style) style.fetch(state) end |