Class: PhlexKit::ComboboxBadge
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::ComboboxBadge
- Defined in:
- app/components/phlex_kit/combobox/combobox_badge.rb
Overview
Selected-value chip, ported from ruby_ui's RubyUI::ComboboxBadge. The controller builds chips with this class into the ComboboxBadgeTrigger's container client-side; render the component directly when server-rendering an initial selection. See combobox.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ ComboboxBadge
constructor
A new instance of ComboboxBadge.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ ComboboxBadge
Returns a new instance of ComboboxBadge.
7 8 9 |
# File 'app/components/phlex_kit/combobox/combobox_badge.rb', line 7 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
11 12 13 |
# File 'app/components/phlex_kit/combobox/combobox_badge.rb', line 11 def view_template(&) span(**mix({ class: "pk-combobox-badge" }, @attrs), &) end |