Class: Ariadne::TableNavComponent::BaseRowItem

Inherits:
Ariadne::TableNavComponent show all
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

HeaderRowItem, RowItem

Defined Under Namespace

Classes: HeaderRowItem, RowItem

Constant Summary collapse

BASE_ROW_CLASSES =
""
DEFAULT_TAG =
:tr
BASE_SELECTION_CLASSES =
""
BASE_MAIN_CLASSES =
"ariadne-pr-5"

Constants inherited from Ariadne::TableNavComponent

DEFAULT_CLASSES

Constants inherited from Component

Component::BASE_HIDDEN_CLASS, Component::BASE_WRAPPER_CLASSES, Component::INVALID_ARIA_LABEL_TAGS

Constants included from ActionViewExtensions::FormHelper

ActionViewExtensions::FormHelper::DEFAULT_FORM_CLASSES

Constants included from Status::Dsl

Status::Dsl::STATUSES

Constants included from ViewHelper

ViewHelper::HELPERS

Constants included from FetchOrFallbackHelper

FetchOrFallbackHelper::INTEGER_TYPES, FetchOrFallbackHelper::InvalidValueError, FetchOrFallbackHelper::TRUE_OR_FALSE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ariadne::TableNavComponent

#has_footer?, #has_header_row?

Methods included from ActionViewExtensions::FormHelper

#ariadne_form_with

Methods included from ClassNameHelper

#class_names

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: {}) ⇒ BaseRowItem

Returns a new instance of BaseRowItem.



114
115
116
117
118
119
# File 'app/components/ariadne/table_nav_component.rb', line 114

def initialize(classes: "", attributes: {})
  @tag = DEFAULT_TAG
  @classes = class_names(BASE_ROW_CLASSES, classes)

  @attributes = attributes
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



112
113
114
# File 'app/components/ariadne/table_nav_component.rb', line 112

def attributes
  @attributes
end

#classesObject (readonly)

Returns the value of attribute classes.



112
113
114
# File 'app/components/ariadne/table_nav_component.rb', line 112

def classes
  @classes
end

Instance Method Details

#callObject



129
130
131
# File 'app/components/ariadne/table_nav_component.rb', line 129

def call
  Ariadne::BaseComponent.new(tag: @tag, classes: @classes, attributes: @attributes)
end