Class: PhlexKit::ButtonGroupText

Inherits:
BaseComponent show all
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

Methods inherited from BaseComponent

#on

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