Class: HakumiComponents::Menu::Group::Component
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- HakumiComponents::Menu::Group::Component
- Extended by:
- T::Sig
- Defined in:
- app/components/hakumi_components/menu/group/component.rb
Constant Summary
Constants inherited from BaseComponent
BaseComponent::ControllerOptions, BaseComponent::DateInput, BaseComponent::DateLikeValue, BaseComponent::DimensionInput, BaseComponent::HtmlPayloadInput, BaseComponent::I18nOptionValue, BaseComponent::PresenceArray, BaseComponent::PresenceScalar, BaseComponent::PresenceValue, BaseComponent::RawHtmlInput, BaseComponent::SIZES, BaseComponent::SizeValue, BaseComponent::SymbolInput
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Instance Method Summary collapse
- #group_classes ⇒ Object
-
#initialize(label:, **html_options) ⇒ Component
constructor
A new instance of Component.
- #list_classes ⇒ Object
- #title_classes ⇒ Object
Methods inherited from BaseComponent
#append_data_token, boolean_html_param, #build_inline_style, cast_boolean, #cast_boolean, #class_names, #component_classes, #data_attributes_from, #dimension_to_css, #ensure_dom_id!, float_html_param, #generate_id, #html_classes, html_param, html_primitive_param, #html_style, #i18n_scope, integer_html_param, #merge_attributes, #render_value, #size_to_pixels, #stimulus_attrs, string_html_param, string_or_symbol_array_html_param, symbol_html_param, #t_default, #translate_with_default, #validate_inclusion!, #validate_required!, #value_present?
Constructor Details
#initialize(label:, **html_options) ⇒ Component
Returns a new instance of Component.
23 24 25 26 |
# File 'app/components/hakumi_components/menu/group/component.rb', line 23 def initialize(label:, **) @label = T.let(label, String) @html_options = T.let(, Types::HtmlAttributes) end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
29 30 31 |
# File 'app/components/hakumi_components/menu/group/component.rb', line 29 def label @label end |
Instance Method Details
#group_classes ⇒ Object
32 33 34 |
# File 'app/components/hakumi_components/menu/group/component.rb', line 32 def group_classes "hakumi-menu-item-group" end |
#list_classes ⇒ Object
42 43 44 |
# File 'app/components/hakumi_components/menu/group/component.rb', line 42 def list_classes "hakumi-menu-item-group-list" end |
#title_classes ⇒ Object
37 38 39 |
# File 'app/components/hakumi_components/menu/group/component.rb', line 37 def title_classes "hakumi-menu-item-group-title" end |