Class: PhlexUI::Dialog::Content
- Defined in:
- lib/phlex_ui/dialog/content.rb
Constant Summary collapse
- SIZES =
{ xs: "max-w-sm", sm: "max-w-md", md: "max-w-lg", lg: "max-w-2xl", xl: "max-w-4xl", full: "max-w-full" }
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(size: :md, **attrs) ⇒ Content
constructor
A new instance of Content.
- #view_template ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(size: :md, **attrs) ⇒ Content
Returns a new instance of Content.
14 15 16 17 |
# File 'lib/phlex_ui/dialog/content.rb', line 14 def initialize(size: :md, **attrs) @size = size super(**attrs) end |
Instance Method Details
#view_template ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/phlex_ui/dialog/content.rb', line 19 def view_template template_tag(data: {dialog_target: "content"}) do div(data: {controller: "dismissable"}) do backdrop div(**attrs) do yield end end end end |