Class: Yattho::Alpha::Dialog::Header
- Defined in:
- app/components/yattho/alpha/dialog/header.rb
Overview
A ‘Dialog::Header` is a compositional component, used to render the Header of a dialog. See <%= link_to_component(Yattho::Alpha::Dialog) %>.
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(id:, title:, subtitle: nil, show_divider: false, visually_hide_title: false, **system_arguments) ⇒ Header
constructor
A new instance of Header.
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(id:, title:, subtitle: nil, show_divider: false, visually_hide_title: false, **system_arguments) ⇒ Header
Returns a new instance of Header.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/components/yattho/alpha/dialog/header.rb', line 17 def initialize( id:, title:, subtitle: nil, show_divider: false, visually_hide_title: false, **system_arguments ) @id = id @title = title @subtitle = subtitle @visually_hide_title = visually_hide_title @system_arguments = deny_tag_argument(**system_arguments) @system_arguments[:tag] = :div @system_arguments[:classes] = class_names( "Overlay-header", { 'Overlay-header--divided': show_divider }, system_arguments[:classes] ) end |