Class: PhlexKit::ComboboxItemIndicator
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::ComboboxItemIndicator
- Defined in:
- app/components/phlex_kit/combobox/combobox_item_indicator.rb
Overview
Trailing ✓ in a PhlexKit::ComboboxItem, visible (pure CSS) while the item's input is checked. See combobox.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ ComboboxItemIndicator
constructor
A new instance of ComboboxItemIndicator.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ ComboboxItemIndicator
Returns a new instance of ComboboxItemIndicator.
5 6 7 |
# File 'app/components/phlex_kit/combobox/combobox_item_indicator.rb', line 5 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/components/phlex_kit/combobox/combobox_item_indicator.rb', line 9 def view_template svg(**mix({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewbox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "pk-combobox-item-indicator", "aria-hidden": "true" }, @attrs)) do |s| s.path(d: "M20 6 9 17l-5-5") end end |