Class: Yattho::Alpha::HellipButton
- Defined in:
- app/components/yattho/alpha/hellip_button.rb
Overview
Use ‘HellipButton` to render a button with a hellip. Often used for hidden text expanders.
Direct Known Subclasses
Constant Summary
Constants inherited from Component
Component::INVALID_ARIA_LABEL_TAGS
Constants included from Status::Dsl
Constants included from ViewHelper
Constants included from TestSelectorHelper
TestSelectorHelper::TEST_SELECTOR_TAG
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(inline: false, **system_arguments) ⇒ HellipButton
constructor
A new instance of HellipButton.
Methods inherited from Component
Methods included from JoinStyleArgumentsHelper
Methods included from TestSelectorHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #silence_deprecations?
Methods included from ClassNameHelper
Constructor Details
#initialize(inline: false, **system_arguments) ⇒ HellipButton
Returns a new instance of HellipButton.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/components/yattho/alpha/hellip_button.rb', line 23 def initialize(inline: false, **system_arguments) @system_arguments = deny_tag_argument(**system_arguments) validate_aria_label @system_arguments[:tag] = :button @system_arguments[:'aria-expanded'] = false @system_arguments[:classes] = class_names( @system_arguments[:classes], "inline" => inline ) end |
Instance Method Details
#call ⇒ Object
36 37 38 |
# File 'app/components/yattho/alpha/hellip_button.rb', line 36 def call render(Yattho::Beta::BaseButton.new(**@system_arguments)) { "…".html_safe } end |