Module: UI::EmptyContentBehavior

Included in:
EmptyContent, EmptyContentComponent
Defined in:
app/helpers/ui/empty_behavior.rb,
app/behaviors/ui/empty_behavior.rb

Overview

EmptyContentBehavior - Shared behavior for EmptyContent sub-component

Instance Method Summary collapse

Instance Method Details

#empty_content_classesObject



117
118
119
120
121
122
# File 'app/helpers/ui/empty_behavior.rb', line 117

def empty_content_classes
  classes_value = respond_to?(:classes, true) ? classes : @classes
  TailwindMerge::Merger.new.merge([
    classes_value
  ].compact.join(" "))
end

#empty_content_html_attributesObject



110
111
112
113
114
115
# File 'app/helpers/ui/empty_behavior.rb', line 110

def empty_content_html_attributes
  {
    class: empty_content_classes,
    data: {slot: "empty-content"}
  }
end