Class: Tramway::FlashComponent

Inherits:
BaseComponent
  • Object
show all
Includes:
ColorsMethods
Defined in:
app/components/tramway/flash_component.rb

Overview

Description: A Tramway flash message component for displaying notifications.

Constant Summary

Constants included from ColorsMethods

ColorsMethods::TYPE_COLOR_MAP

Instance Method Summary collapse

Methods included from ColorsMethods

#normalized_type, #resolved_color, #type_color

Instance Method Details

#container_classesObject



13
14
15
# File 'app/components/tramway/flash_component.rb', line 13

def container_classes
  'fixed top-4 right-4 z-50 flex w-fit max-w-sm flex-col gap-2 pointer-events-none'
end

#flash_classesObject



17
18
19
# File 'app/components/tramway/flash_component.rb', line 17

def flash_classes
  (base_flash_classes + semantic_flash_classes).join(' ')
end

#title_classesObject



21
22
23
# File 'app/components/tramway/flash_component.rb', line 21

def title_classes
  'text-sm font-medium leading-6'
end