Module: UI::SmallBehavior

Defined in:
app/behaviors/ui/small_behavior.rb

Overview

UI::SmallBehavior

Instance Method Summary collapse

Instance Method Details

#small_base_classesObject

Base CSS classes for Small



16
17
18
# File 'app/behaviors/ui/small_behavior.rb', line 16

def small_base_classes
  "text-sm font-medium leading-none"
end

#small_classesObject

Merge base classes with custom classes using TailwindMerge



21
22
23
# File 'app/behaviors/ui/small_behavior.rb', line 21

def small_classes
  TailwindMerge::Merger.new.merge([small_base_classes, @classes].compact.join(" "))
end

#small_html_attributesObject

Build complete HTML attributes hash



26
27
28
29
30
# File 'app/behaviors/ui/small_behavior.rb', line 26

def small_html_attributes
  {
    class: small_classes
  }
end