Class: Ariadne::BottomTabNavComponent
- Defined in:
- app/components/ariadne/bottom_tab_nav_component.rb
Overview
Navigation component for BottomTabs
Constant Summary collapse
- DEFAULT_TAG =
:nav- DEFAULT_TAB_TAG =
:a- TAG_OPTIONS =
[DEFAULT_TAG].freeze
- DEFAULT_CLASSES =
"ariadne-flex"- DEFAULT_ATTRIBUTES =
{ "data-controller": "options", "data-options-synced-attrs-value": '["aria-selected"]', role: "tablist", }
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 Method Summary collapse
-
#initialize(tag: DEFAULT_TAG, classes: "", attributes: {}) ⇒ BottomTabNavComponent
constructor
A new instance of BottomTabNavComponent.
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(tag: DEFAULT_TAG, classes: "", attributes: {}) ⇒ BottomTabNavComponent
Returns a new instance of BottomTabNavComponent.
27 28 29 30 31 |
# File 'app/components/ariadne/bottom_tab_nav_component.rb', line 27 def initialize(tag: DEFAULT_TAG, classes: "", attributes: {}) @tag = check_incoming_tag(DEFAULT_TAG, tag) @classes = merge_class_names(DEFAULT_CLASSES, classes) @attributes = DEFAULT_ATTRIBUTES.merge(attributes) end |