Class: Tramway::FlashComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Tramway::FlashComponent
- 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
Constants included from Helpers::ViewsHelper
Helpers::ViewsHelper::FORM_SIZES
Instance Method Summary collapse
Methods included from ColorsMethods
#normalized_type, #resolved_color, #type_color
Methods included from Helpers::ViewsHelper
#tramway_back_button, #tramway_badge, #tramway_button, #tramway_cell, #tramway_chat, #tramway_container, #tramway_flash, #tramway_form_for, #tramway_header, #tramway_main_container, #tramway_row, #tramway_table, #tramway_title
Methods included from Helpers::ComponentHelper
Methods included from Helpers::DecorateHelper
Instance Method Details
#container_classes ⇒ Object
13 14 15 16 17 |
# File 'app/components/tramway/flash_component.rb', line 13 def container_classes theme_classes( classic: 'fixed top-4 right-4 z-50 space-y-2 pointer-events-none' ) end |
#flash_classes ⇒ Object
19 20 21 22 23 24 |
# File 'app/components/tramway/flash_component.rb', line 19 def flash_classes theme_classes( classic: "flash opacity-100 px-4 py-2 rounded-xl shadow-md bg-#{resolved_color}-100 " \ "text-#{resolved_color}-800" ) end |
#title_classes ⇒ Object
26 27 28 29 30 |
# File 'app/components/tramway/flash_component.rb', line 26 def title_classes theme_classes( classic: 'text-xl font-semibold' ) end |