Class: Solrengine::Ui::ModalComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Solrengine::Ui::ModalComponent
- Defined in:
- app/components/solrengine/ui/modal_component.rb
Constant Summary collapse
- SIZES =
{ sm: "max-w-sm", md: "max-w-md", lg: "max-w-lg", xl: "max-w-xl" }.freeze
Instance Attribute Summary collapse
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title: nil, size: :md) ⇒ ModalComponent
constructor
A new instance of ModalComponent.
- #size_class ⇒ Object
Constructor Details
#initialize(title: nil, size: :md) ⇒ ModalComponent
Returns a new instance of ModalComponent.
18 19 20 21 |
# File 'app/components/solrengine/ui/modal_component.rb', line 18 def initialize(title: nil, size: :md) @title = title @size = size end |
Instance Attribute Details
#size ⇒ Object (readonly)
Returns the value of attribute size.
9 10 11 |
# File 'app/components/solrengine/ui/modal_component.rb', line 9 def size @size end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
9 10 11 |
# File 'app/components/solrengine/ui/modal_component.rb', line 9 def title @title end |