Class: Yattho::Alpha::Dropdown
- Defined in:
- app/components/yattho/alpha/dropdown.rb,
app/components/yattho/alpha/dropdown/menu.rb
Overview
‘Dropdown` is a lightweight context menu for housing navigation and actions. They’re great for instances where you don’t need the full power (and code) of the SelectMenu.
Direct Known Subclasses
Defined Under Namespace
Classes: Menu
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
-
#initialize(overlay: :default, with_caret: false, **system_arguments) ⇒ Dropdown
constructor
A new instance of Dropdown.
- #render? ⇒ Boolean
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(overlay: :default, with_caret: false, **system_arguments) ⇒ Dropdown
Returns a new instance of Dropdown.
137 138 139 140 141 142 143 144 145 146 147 |
# File 'app/components/yattho/alpha/dropdown.rb', line 137 def initialize(overlay: :default, with_caret: false, **system_arguments) @with_caret = with_caret @system_arguments = system_arguments @system_arguments[:overlay] = @system_arguments[:reset] = true @system_arguments[:classes] = class_names( @system_arguments[:classes], "dropdown" ) end |
Instance Method Details
#render? ⇒ Boolean
149 150 151 |
# File 'app/components/yattho/alpha/dropdown.rb', line 149 def render? && end |