Class: ShadcnPhlexcomponents::SheetDescription

Inherits:
Base
  • Object
show all
Defined in:
lib/shadcn_phlexcomponents/components/sheet.rb

Constant Summary

Constants inherited from Base

Base::SANITIZER_ALLOWED_ATTRIBUTES, Base::SANITIZER_ALLOWED_TAGS, Base::TAILWIND_MERGER

Instance Method Summary collapse

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) ⇒ SheetDescription

Returns a new instance of SheetDescription.



222
223
224
225
# File 'lib/shadcn_phlexcomponents/components/sheet.rb', line 222

def initialize(aria_id: nil, **attributes)
  @aria_id = aria_id
  super(**attributes)
end

Instance Method Details

#default_attributes ⇒ Object



227
228
229
230
231
# File 'lib/shadcn_phlexcomponents/components/sheet.rb', line 227

def default_attributes
  {
    id: "#{@aria_id}-description",
  }
end

#view_template ⇒ Object



233
234
235
# File 'lib/shadcn_phlexcomponents/components/sheet.rb', line 233

def view_template(&)
  p(**@attributes, &)
end