Class: Charming::Components::Modal
- Inherits:
-
Charming::Component
- Object
- View
- Charming::Component
- Charming::Components::Modal
- Defined in:
- lib/charming/components/modal.rb
Instance Method Summary collapse
-
#initialize(content:, title: nil, help: nil, width: 52, style: nil, theme: nil) ⇒ Modal
constructor
A new instance of Modal.
- #render ⇒ Object
Methods inherited from View
Constructor Details
#initialize(content:, title: nil, help: nil, width: 52, style: nil, theme: nil) ⇒ Modal
Returns a new instance of Modal.
6 7 8 9 10 11 12 13 |
# File 'lib/charming/components/modal.rb', line 6 def initialize(content:, title: nil, help: nil, width: 52, style: nil, theme: nil) super(theme: theme) @content = content @title = title @help = help @width = width @style = style end |
Instance Method Details
#render ⇒ Object
15 16 17 |
# File 'lib/charming/components/modal.rb', line 15 def render box(column(*lines, gap: 1), style: modal_style) end |