Module: UI::AlertDialogDescriptionBehavior
- Included in:
- AlertDialogDescription
- Defined in:
- app/behaviors/ui/alert_dialog_description_behavior.rb
Overview
Shared behavior for AlertDialog Description component Handles description text styling
Instance Method Summary collapse
-
#alert_dialog_description_base_classes ⇒ Object
Base CSS classes for alert dialog description.
-
#alert_dialog_description_classes ⇒ Object
Merge base classes with custom classes using TailwindMerge.
-
#alert_dialog_description_html_attributes ⇒ Object
Build complete HTML attributes hash for alert dialog description.
Instance Method Details
#alert_dialog_description_base_classes ⇒ Object
Base CSS classes for alert dialog description
9 10 11 |
# File 'app/behaviors/ui/alert_dialog_description_behavior.rb', line 9 def alert_dialog_description_base_classes "text-muted-foreground text-sm" end |
#alert_dialog_description_classes ⇒ Object
Merge base classes with custom classes using TailwindMerge
14 15 16 |
# File 'app/behaviors/ui/alert_dialog_description_behavior.rb', line 14 def alert_dialog_description_classes TailwindMerge::Merger.new.merge([alert_dialog_description_base_classes, @classes].compact.join(" ")) end |
#alert_dialog_description_html_attributes ⇒ Object
Build complete HTML attributes hash for alert dialog description
19 20 21 22 23 24 |
# File 'app/behaviors/ui/alert_dialog_description_behavior.rb', line 19 def alert_dialog_description_html_attributes base_attrs = @attributes || {} base_attrs.merge( class: alert_dialog_description_classes ) end |