Class: PhlexKit::InputGroup
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::InputGroup
- Defined in:
- app/components/phlex_kit/input_group/input_group.rb
Overview
Input with attached addons, ported from shadcn/ui's InputGroup: a bordered
shell that focuses as one control; compose InputGroupAddon(align:) around a
plain PhlexKit::Input (its own border/bg collapse inside the group).
.pk-input-group* (input_group.css).
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ InputGroup
constructor
A new instance of InputGroup.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ InputGroup
Returns a new instance of InputGroup.
7 8 9 |
# File 'app/components/phlex_kit/input_group/input_group.rb', line 7 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
11 12 13 |
# File 'app/components/phlex_kit/input_group/input_group.rb', line 11 def view_template(&) div(**mix({ class: "pk-input-group", role: "group" }, @attrs), &) end |