Class: ShadcnPhlexcomponents::DialogDescription
- Defined in:
- lib/shadcn_phlexcomponents/components/dialog.rb
Constant Summary
Constants inherited from Base
Base::SANITIZER_ALLOWED_ATTRIBUTES, Base::SANITIZER_ALLOWED_TAGS, Base::TAILWIND_MERGER
Instance Method Summary collapse
- #default_attributes ⇒ Object
-
#initialize(aria_id: nil, **attributes) ⇒ DialogDescription
constructor
A new instance of DialogDescription.
- #view_template ⇒ Object
Methods inherited from Base
#before_template, #convert_collection_hash_to_struct, #find_as_child, #icon, #item_disabled?, #merge_default_attributes, #merged_as_child_attributes, #nokogiri_attributes_to_hash, #overlay, #sanitize_as_child
Constructor Details
#initialize(aria_id: nil, **attributes) ⇒ DialogDescription
Returns a new instance of DialogDescription.
202 203 204 205 |
# File 'lib/shadcn_phlexcomponents/components/dialog.rb', line 202 def initialize(aria_id: nil, **attributes) @aria_id = aria_id super(**attributes) end |
Instance Method Details
#default_attributes ⇒ Object
207 208 209 210 211 |
# File 'lib/shadcn_phlexcomponents/components/dialog.rb', line 207 def default_attributes { id: "#{@aria_id}-description", } end |
#view_template ⇒ Object
213 214 215 |
# File 'lib/shadcn_phlexcomponents/components/dialog.rb', line 213 def view_template(&) p(**@attributes, &) end |