Class: RubyUI::ComboboxContent
- Defined in:
- lib/ruby_ui/combobox/combobox_content.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ ComboboxContent
constructor
A new instance of ComboboxContent.
- #view_template ⇒ Object
Constructor Details
#initialize(**attrs) ⇒ ComboboxContent
Returns a new instance of ComboboxContent.
5 6 7 8 |
# File 'lib/ruby_ui/combobox/combobox_content.rb', line 5 def initialize(**attrs) @id = "content#{SecureRandom.hex(4)}" super end |
Instance Method Details
#view_template ⇒ Object
10 11 12 13 14 |
# File 'lib/ruby_ui/combobox/combobox_content.rb', line 10 def view_template(&) div(**attrs) do div(class: "min-w-max max-h-[300px] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-out group-data-[ruby-ui--combobox-open-value=true]/combobox:animate-in fade-out-0 group-data-[ruby-ui--combobox-open-value=true]/combobox:fade-in-0 zoom-out-95 group-data-[ruby-ui--combobox-open-value=true]/combobox:zoom-in-95 slide-in-from-top-2", &) end end |