Class: Ariadne::TableNavComponent::BaseCellItem
- Inherits:
-
Ariadne::TableNavComponent
- Object
- ViewComponent::Base
- Component
- Ariadne::TableNavComponent
- Ariadne::TableNavComponent::BaseCellItem
- 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.
Direct Known Subclasses
Defined Under Namespace
Classes: CellItem, HeaderCellItem
Constant Summary collapse
- DEFAULT_CELL_CLASSES =
"ariadne-py-3.5 ariadne-pl-4 ariadne-pr-3 ariadne-text-left ariadne-text-sm ariadne-text-gray-900"
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 collapse
-
#first ⇒ Object
writeonly
Sets the attribute first.
-
#last ⇒ Object
writeonly
Sets the attribute last.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", attributes: {}) ⇒ BaseCellItem
constructor
A new instance of 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: {}) ⇒ BaseCellItem
Returns a new instance of BaseCellItem.
183 184 185 186 187 188 189 190 |
# File 'app/components/ariadne/table_nav_component.rb', line 183 def initialize(classes: "", attributes: {}) @classes = class_names( DEFAULT_CELL_CLASSES, classes, ) @attributes = attributes end |
Instance Attribute Details
#first=(value) ⇒ Object (writeonly)
Sets the attribute first
181 182 183 |
# File 'app/components/ariadne/table_nav_component.rb', line 181 def first=(value) @first = value end |
#last=(value) ⇒ Object (writeonly)
Sets the attribute last
181 182 183 |
# File 'app/components/ariadne/table_nav_component.rb', line 181 def last=(value) @last = value end |
Instance Method Details
#call ⇒ Object
192 193 194 195 196 |
# File 'app/components/ariadne/table_nav_component.rb', line 192 def call render(Ariadne::BaseComponent.new(tag: @tag, classes: @classes, attributes: @attributes)) do content end end |