Class: Tailwinds::BadgeComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- Tramway::BaseComponent
- BaseComponent
- Tailwinds::BadgeComponent
- Defined in:
- app/components/tailwinds/badge_component.rb
Overview
Default Tramway badge
Constant Summary
Constants inherited from BaseComponent
Tailwinds::BaseComponent::TYPE_COLOR_MAP
Instance Method Summary collapse
Methods inherited from BaseComponent
#normalized_type, #resolved_color, #type_color
Methods included from Tramway::Helpers::ViewsHelper
#tramway_back_button, #tramway_badge, #tramway_button, #tramway_cell, #tramway_container, #tramway_flash, #tramway_form_for, #tramway_header, #tramway_row, #tramway_table, #tramway_title
Methods included from Tramway::Helpers::ComponentHelper
Methods included from Tramway::Helpers::DecorateHelper
Instance Method Details
#classes ⇒ Object
11 12 13 14 15 16 |
# File 'app/components/tailwinds/badge_component.rb', line 11 def classes [ 'flex', 'px-3', 'py-1', 'text-sm', 'font-semibold', 'text-white', "bg-#{resolved_color}-500", "dark:bg-#{resolved_color}-600", 'rounded-full', 'w-fit', 'h-fit' ] end |