Class: Shadcn::InputGroupComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::InputGroupComponent
- Defined in:
- app/components/shadcn/input_group_component.rb
Overview
Input Group component for inputs with prefix/suffix addons Matches shadcn/ui Input Group pattern
Defined Under Namespace
Classes: AddonComponent
Constant Summary collapse
- BASE_CLASSES =
"flex items-center rounded-md border border-input ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
This class inherits a constructor from Shadcn::BaseComponent
Instance Method Details
#call ⇒ Object
55 56 57 58 59 |
# File 'app/components/shadcn/input_group_component.rb', line 55 def call tag.div(class: merge_classes(BASE_CLASSES), **.merge(build_data)) do safe_join([prefix, input, suffix].compact) end end |