Class: Shadcn::Command::Empty::Component
- Inherits:
-
ApplicationViewComponent
- Object
- ViewComponent::Base
- ApplicationViewComponent
- Shadcn::Command::Empty::Component
- Defined in:
- app/components/shadcn/command/empty/component.rb
Overview
What is shown when nothing matches. Rendered hidden and revealed by the controller: the server cannot know what a caller will type, and an empty state that only exists once JavaScript has run is one a reader sees flash in.
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
#call, #css_classes, 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
#element_attributes(**defaults) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'app/components/shadcn/command/empty/component.rb', line 18 def element_attributes(**defaults) super(**{ "cmdk-empty" => "", role: "presentation", hidden: true, "data-shadcn--command-target" => "empty" }.merge(defaults)) end |