Module: UI::CommandEmptyBehavior
- Included in:
- CommandEmpty, CommandEmptyComponent
- Defined in:
- app/behaviors/ui/command_empty_behavior.rb
Overview
EmptyBehavior
Shared behavior for CommandEmpty component.
Instance Method Summary collapse
- #command_empty_classes ⇒ Object
- #command_empty_data_attributes ⇒ Object
- #command_empty_html_attributes ⇒ Object
Instance Method Details
#command_empty_classes ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/behaviors/ui/command_empty_behavior.rb', line 16 def command_empty_classes classes_value = respond_to?(:classes, true) ? classes : @classes TailwindMerge::Merger.new.merge([ command_empty_base_classes, classes_value ].compact.join(" ")) end |
#command_empty_data_attributes ⇒ Object
24 25 26 27 28 29 |
# File 'app/behaviors/ui/command_empty_behavior.rb', line 24 def command_empty_data_attributes { slot: "command-empty", ui__command_target: "empty" } end |
#command_empty_html_attributes ⇒ Object
9 10 11 12 13 14 |
# File 'app/behaviors/ui/command_empty_behavior.rb', line 9 def command_empty_html_attributes { class: command_empty_classes, data: command_empty_data_attributes } end |