Class: Shadcn::Sidebar::Input::Component
- Inherits:
-
Input::Component
- Object
- ViewComponent::Base
- ApplicationViewComponent
- Input::Component
- Shadcn::Sidebar::Input::Component
- Defined in:
- app/components/shadcn/sidebar/input/component.rb
Overview
SidebarInput — the ported Input under another data-slot, with the
sidebar's own sizing on top. Inherit-and-restamp, as ButtonGroupSeparator
does to Separator, so the parent's classes are not restated and cannot
rot.
Constant Summary collapse
- EXTRA_CLASSES =
"h-8 w-full bg-background shadow-none"
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, #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
15 16 17 |
# File 'app/components/shadcn/sidebar/input/component.rb', line 15 def css_classes(extra = nil) super([ EXTRA_CLASSES, extra ].compact.join(" ")) end |
#element_attributes(**defaults) ⇒ Object
19 20 21 |
# File 'app/components/shadcn/sidebar/input/component.rb', line 19 def element_attributes(**defaults) super(**{ "data-sidebar" => "input" }.merge(defaults)) end |