Class: Tailwinds::Form::Multiselect::ItemContainerComponent

Inherits:
Tramway::BaseComponent show all
Defined in:
app/components/tailwinds/form/multiselect/item_container_component.rb

Overview

Container for item in dropdown component

Constant Summary collapse

SIZE_CLASSES =
{
  small: 'p-1',
  medium: 'p-2',
  large: 'p-3'
}.freeze

Constants included from Tramway::Helpers::ViewsHelper

Tramway::Helpers::ViewsHelper::FORM_SIZES

Instance Method Summary collapse

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_main_container, #tramway_row, #tramway_table, #tramway_title

Methods included from Tramway::Helpers::ComponentHelper

#component

Methods included from Tramway::Helpers::DecorateHelper

#tramway_decorate

Instance Method Details

#item_classesObject



16
17
18
19
20
# File 'app/components/tailwinds/form/multiselect/item_container_component.rb', line 16

def item_classes
  theme_classes(
    classic: "cursor-pointer hover:bg-gray-800 shadow-inner option #{SIZE_CLASSES[size]}"
  )
end