Class: PhlexKit::ButtonGroupText
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::ButtonGroupText
- Defined in:
- app/components/phlex_kit/button_group/button_group_text.rb
Overview
Static text segment inside a PhlexKit::ButtonGroup, ported from shadcn/ui's ButtonGroupText — a muted, bordered cell that joins the group like a button but isn't interactive. See button_group.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ ButtonGroupText
constructor
A new instance of ButtonGroupText.
- #view_template(&block) ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ ButtonGroupText
Returns a new instance of ButtonGroupText.
6 7 8 |
# File 'app/components/phlex_kit/button_group/button_group_text.rb', line 6 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template(&block) ⇒ Object
10 11 12 |
# File 'app/components/phlex_kit/button_group/button_group_text.rb', line 10 def view_template(&block) div(**mix({ class: "pk-button-group-text" }, @attrs), &block) end |