Class: TailwindComponent

Inherits:
Tramway::BaseComponent show all
Defined in:
app/components/tailwind_component.rb

Overview

Base TailwindComponent. Contains base features for all tailwind components

Constant Summary collapse

SIZE_CLASSES =
{
  small: {
    text_input: 'text-sm px-2 py-1',
    select_input: 'text-sm px-2 py-1',
    file_button: 'text-sm px-3 py-1',
    submit_button: 'text-sm px-3 py-1',
    tramway_select_input: 'text-sm px-2 py-1 h-10',
    checkbox_input: 'min-h-4 min-w-4'
  },
  medium: {
    text_input: 'text-base px-3 py-2',
    select_input: 'text-base px-3 py-2',
    file_button: 'text-base px-4 py-2',
    submit_button: 'text-base px-4 py-2',
    tramway_select_input: 'text-base px-2 py-1 h-12',
    checkbox_input: 'min-h-5 min-w-5'
  },
  large: {
    text_input: 'text-xl px-4 py-3',
    select_input: 'text-xl px-4 py-3',
    file_button: 'text-xl px-5 py-3',
    submit_button: 'text-xl px-5 py-3',
    tramway_select_input: 'text-xl px-3 py-2 h-15',
    checkbox_input: 'min-h-6 min-w-6'
  }
}.freeze

Constants included from Tramway::Helpers::ViewsHelper

Tramway::Helpers::ViewsHelper::FORM_SIZES

Method Summary

Methods included from Tramway::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 Tramway::Helpers::ComponentHelper

#component

Methods included from Tramway::Helpers::DecorateHelper

#tramway_decorate