Class: Ariadne::TableComponent::RowItem::HeaderCellItem
- Inherits:
-
Ariadne::TableComponent::RowItem
- Object
- ViewComponent::Base
- Component
- Ariadne::TableComponent::RowItem
- Ariadne::TableComponent::RowItem::HeaderCellItem
- Defined in:
- app/components/ariadne/table_component.rb
Overview
This component is part of TableComponent and should not be used as a standalone component.
Constant Summary collapse
- DEFAULT_HEADER_CELL_CLASSES =
"ariadne-py-3.5 ariadne-pl-4 pr-3 ariadne-text-left ariadne-text-sm ariadne-font-semibold ariadne-text-gray-900 ariadne-sm:pl-6"
Constants inherited from Ariadne::TableComponent::RowItem
Constants inherited from Component
Component::BASE_BODY_CLASSES, Component::BASE_HTML_CLASSES, 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 Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", attributes: {}) ⇒ HeaderCellItem
constructor
A new instance of HeaderCellItem.
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
Returns a new instance of HeaderCellItem.
119 120 121 122 123 124 125 126 |
# File 'app/components/ariadne/table_component.rb', line 119 def initialize(classes: "", attributes: {}) @classes = class_names( DEFAULT_HEADER_CELL_CLASSES, classes, ) @attributes = attributes end |
Instance Method Details
#call ⇒ Object
128 129 130 |
# File 'app/components/ariadne/table_component.rb', line 128 def call render(Ariadne::BaseComponent.new(tag: :span, classes: @classes, attributes: @attributes)) { content } end |