Class: Shadcn::Drawer::Header::Component
- Inherits:
-
ApplicationViewComponent
- Object
- ViewComponent::Base
- ApplicationViewComponent
- Shadcn::Drawer::Header::Component
- Defined in:
- app/components/shadcn/drawer/header/component.rb
Overview
DrawerHeader — a slot for the title and the description, as the Sheet's and the Dialog's are.
The two group-data-* classes read the direction off the content,
which is why that attribute lives there rather than on the root shadcn
takes it on: a header centres itself only when the drawer comes from an
edge that makes it the top of the panel.
Constant Summary
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
#css_classes, 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
#call ⇒ Object
28 29 30 |
# File 'app/components/shadcn/drawer/header/component.rb', line 28 def call render_element(body: safe_join([ title, description, content ].compact)) end |