Class: Ariadne::PanelBarComponent
- Defined in:
- app/components/ariadne/panel_bar_component.rb
Overview
Add a general description of component here Add additional usage considerations or best practices that may aid the user to use the component correctly.
Defined Under Namespace
Classes: PanelItem
Constant Summary collapse
- DEFAULT_TAG =
:ol- TAG_OPTIONS =
[DEFAULT_TAG].freeze
- DEFAULT_CLASSES =
"ariadne-border ariadne-border-gray-300 ariadne-rounded-md ariadne-divide-y ariadne-divide-gray-300 md:ariadne-flex md:ariadne-divide-y-0"
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
-
#initialize(classes: "", attributes: {}) ⇒ PanelBarComponent
constructor
A new instance of PanelBarComponent.
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: {}) ⇒ PanelBarComponent
Returns a new instance of PanelBarComponent.
22 23 24 25 26 27 28 29 30 31 |
# File 'app/components/ariadne/panel_bar_component.rb', line 22 def initialize(classes: "", attributes: {}) @tag = DEFAULT_TAG @classes = class_names( DEFAULT_CLASSES, classes, ) @attributes = attributes @attributes[:role] ||= "list" end |