Class: Ariadne::TableNavComponent::BaseCellItem::HeaderCellItem
- Inherits:
-
Ariadne::TableNavComponent::BaseCellItem
- Object
- ViewComponent::Base
- Component
- Ariadne::TableNavComponent
- Ariadne::TableNavComponent::BaseCellItem
- Ariadne::TableNavComponent::BaseCellItem::HeaderCellItem
- Defined in:
- app/components/ariadne/table_nav_component.rb
Overview
This component is part of TableNavComponent and should not be used as a standalone component.
Constant Summary collapse
- DEFAULT_HEADER_CELL_CLASSES =
"ariadne-py-3.5 ariadne-pl-4 ariadne-pr-3 ariadne-text-left ariadne-text-sm ariadne-font-semibold ariadne-text-gray-900 sm:ariadne-pl-6 md:ariadne-pl-0"- DEFAULT_TAG =
:th- WIDTH_CLASSES =
{ none: "ariadne-flex-none ariadne-w-14 ariadne-px-4", default: "ariadne-flex-initial", narrow: "ariadne-flex-initial ariadne-w-1/5 ariadne-text-right", wide: "ariadne-flex-grow ariadne-w-3/5 sm:ariadne-pl-6", }
Constants inherited from Ariadne::TableNavComponent::BaseCellItem
Constants inherited from Ariadne::TableNavComponent
Constants inherited from Component
Component::BASE_HIDDEN_CLASS, Component::BASE_MAIN_CLASSES, Component::BASE_WRAPPER_CLASSES, Component::INVALID_ARIA_LABEL_TAGS
Constants included from ActionViewExtensions::FormHelper
ActionViewExtensions::FormHelper::DEFAULT_FORM_CLASSES
Constants included from Status::Dsl
Constants included from ViewHelper
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::INTEGER_TYPES, FetchOrFallbackHelper::InvalidValueError, FetchOrFallbackHelper::TRUE_OR_FALSE
Instance Attribute Summary
Attributes inherited from Ariadne::TableNavComponent::BaseCellItem
Instance Method Summary collapse
-
#initialize(classes: "", attributes: {}) ⇒ HeaderCellItem
constructor
TODO: add one_of check for width.
Methods inherited from Ariadne::TableNavComponent::BaseCellItem
Methods inherited from Ariadne::TableNavComponent
#has_footer?, #has_header_row?
Methods included from ActionViewExtensions::FormHelper
Methods included from ClassNameHelper
Methods included from LoggerHelper
#logger, #silence_deprecations?, #silence_warnings?
Methods included from FetchOrFallbackHelper
#check_incoming_attribute, #check_incoming_tag, #check_incoming_value, #fetch_or_raise, #fetch_or_raise_boolean, #fetch_or_raise_integer
Constructor Details
#initialize(classes: "", attributes: {}) ⇒ HeaderCellItem
TODO: add one_of check for width
213 214 215 216 217 218 |
# File 'app/components/ariadne/table_nav_component.rb', line 213 def initialize(classes: "", attributes: {}) @tag = DEFAULT_TAG actual_classes = class_names(DEFAULT_HEADER_CELL_CLASSES, classes) attributes["scope"] = "col" super(classes: actual_classes, attributes: attributes) end |