Class: HakumiComponents::Typography::Title::Component
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- BaseComponent
- HakumiComponents::Typography::Title::Component
- Extended by:
- T::Sig
- Defined in:
- app/components/hakumi_components/typography/title/component.rb
Constant Summary collapse
- LEVELS =
T.let([ 1, 2, 3, 4, 5 ].freeze, T::Array[Integer])
Constants inherited from BaseComponent
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 Method Summary collapse
-
#initialize(level: 1, type: nil, disabled: false, mark: false, code: false, keyboard: false, underline: false, delete: false, strong: false, italic: false, copyable: false, copied_text: nil, copy_error_text: nil, **html_options) ⇒ Component
constructor
A new instance of Component.
Methods inherited from BaseComponent
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(level: 1, type: nil, disabled: false, mark: false, code: false, keyboard: false, underline: false, delete: false, strong: false, italic: false, copyable: false, copied_text: nil, copy_error_text: nil, **html_options) ⇒ Component
Returns a new instance of Component.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'app/components/hakumi_components/typography/title/component.rb', line 30 def initialize( level: 1, type: nil, disabled: false, mark: false, code: false, keyboard: false, underline: false, delete: false, strong: false, italic: false, copyable: false, copied_text: nil, copy_error_text: nil, ** ) @level = T.let(level, Integer) super( type: type, disabled: disabled, mark: mark, code: code, keyboard: keyboard, underline: underline, delete: delete, strong: strong, italic: italic, copyable: copyable, copied_text: copied_text, copy_error_text: copy_error_text, ** ) end |