Class: Shadcn::DialogComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::DialogComponent
- Defined in:
- app/components/shadcn/dialog_component.rb
Overview
Dialog component for modal windows Matches shadcn/ui Dialog component Uses Stimulus for interactivity
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
-
#initialize(id: nil, open: false, modal: true, **options) ⇒ DialogComponent
constructor
A new instance of DialogComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(id: nil, open: false, modal: true, **options) ⇒ DialogComponent
Returns a new instance of DialogComponent.
34 35 36 37 38 39 |
# File 'app/components/shadcn/dialog_component.rb', line 34 def initialize(id: nil, open: false, modal: true, **) super(**) @id = id @open = open @modal = modal end |