Class: Shadcn::InputGroup::Input::Component
- Inherits:
-
Shadcn::Input::Component
- Object
- ViewComponent::Base
- ApplicationViewComponent
- Shadcn::Input::Component
- Shadcn::InputGroup::Input::Component
- Defined in:
- app/components/shadcn/input_group/input/component.rb
Overview
InputGroupInput renders the ported Input, stripped of its own border and ring so the group's box provides both.
Its data-slot is input-group-control, which it shares with
InputGroupTextarea. That is deliberate upstream: the group's
has-[[data-slot=input-group-control]:focus-visible]:… classes have to
match either one, so disambiguating them would break the focus ring.
Constant Summary collapse
- EXTRA_CLASSES =
"flex-1 rounded-none border-0 bg-transparent shadow-none " \ "focus-visible:ring-0 dark:bg-transparent"
Constants inherited from ApplicationViewComponent
ApplicationViewComponent::CONTENTS_STYLE, ApplicationViewComponent::VOID_TAGS
Instance Attribute Summary
Attributes inherited from ApplicationViewComponent
Instance Method Summary collapse
Methods inherited from ApplicationViewComponent
#call, default_tag, #element_attributes, #initialize, #merged_style, #render_element, #shadcn_t, slot_name, #style_variants, #tag_name
Constructor Details
This class inherits a constructor from Shadcn::ApplicationViewComponent
Instance Method Details
#css_classes(extra = nil) ⇒ Object
19 20 21 |
# File 'app/components/shadcn/input_group/input/component.rb', line 19 def css_classes(extra = nil) super([ EXTRA_CLASSES, extra ].compact.join(" ")) end |