Class: RubyUI::ComboboxContent

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_ui/combobox/combobox_content.rb

Constant Summary

Constants inherited from Base

Base::TAILWIND_MERGER

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

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_templateObject



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