Class: RBUI::SelectContent
- Defined in:
- lib/rbui/select/select_content.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ SelectContent
constructor
A new instance of SelectContent.
- #view_template(&block) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(**attrs) ⇒ SelectContent
Returns a new instance of SelectContent.
5 6 7 8 |
# File 'lib/rbui/select/select_content.rb', line 5 def initialize(**attrs) @id = "content#{SecureRandom.hex(4)}" super end |
Instance Method Details
#view_template(&block) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/rbui/select/select_content.rb', line 10 def view_template(&block) div(**attrs) do div( class: "max-h-96 min-w-max overflow-auto rounded-md border bg-background p-1 text-foreground shadow-md animate-out group-data-[rbui--select-open-value=true]/select:animate-in fade-out-0 group-data-[rbui--select-open-value=true]/select:fade-in-0 zoom-out-95 group-data-[rbui--select-open-value=true]/select:zoom-in-95 slide-in-from-top-2", &block ) end end |