Class: ShadcnPhlexcomponents::ComboboxText
- Defined in:
- lib/shadcn_phlexcomponents/components/combobox.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(target:, **attributes) ⇒ ComboboxText
constructor
A new instance of ComboboxText.
- #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(target:, **attributes) ⇒ ComboboxText
Returns a new instance of ComboboxText.
399 400 401 402 |
# File 'lib/shadcn_phlexcomponents/components/combobox.rb', line 399 def initialize(target:, **attributes) @target = target super(**attributes) end |
Instance Method Details
#default_attributes ⇒ Object
404 405 406 407 408 409 |
# File 'lib/shadcn_phlexcomponents/components/combobox.rb', line 404 def default_attributes { role: "presentation", data: { combobox_target: @target }, } end |
#view_template ⇒ Object
411 412 413 |
# File 'lib/shadcn_phlexcomponents/components/combobox.rb', line 411 def view_template(&) div(**@attributes, &) end |