Class: PhlexUI::Select

Inherits:
Base
  • Object
show all
Defined in:
lib/phlex_ui/select.rb

Defined Under Namespace

Classes: Builder, Content, Group, Input, Item, Label, Trigger, Value

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#before_template

Constructor Details

#initialize(options: {}, **attrs) ⇒ Select

Returns a new instance of Select.



5
6
7
8
9
10
11
# File 'lib/phlex_ui/select.rb', line 5

def initialize(options: {}, **attrs)
  @options = options
  @options[:trigger] ||= "click"
  @options[:duration] ||= [500, 0]
  @options[:placement] ||= "bottom-start"
  super(**attrs)
end

Instance Method Details

#view_templateObject



13
14
15
# File 'lib/phlex_ui/select.rb', line 13

def view_template(&)
  div(**attrs, &)
end