Class: Anchor::TextComponent
- Defined in:
- app/components/anchor/text_component.rb
Constant Summary collapse
- TAG_DEFAULT =
:p
- VARIANT_DEFAULT =
:body_base
- VARIANT_MAPPINGS =
{ body_lg: "text-lg leading-6", body_base: "text-base leading-5", body_sm: "text-sm leading-4", heading_base: "text-base leading-5 font-semibold", heading_lg: "text-lg leading-6 font-semibold", heading_xl: "text-xl leading-6 font-semibold", heading_2xl: "text-2xl leading-7 font-semibold", heading_3xl: "text-3xl leading-8 font-semibold", heading_4xl: "text-4xl leading-10 font-semibold", subheading_sm: "text-base leading-5 font-bold uppercase", subheading_xs: "text-sm leading-4 font-bold uppercase", }.freeze
- VARIANT_OPTIONS =
VARIANT_MAPPINGS.keys
Constants included from ViewHelper
Instance Method Summary collapse
-
#initialize(tag: TAG_DEFAULT, **kwargs) ⇒ TextComponent
constructor
A new instance of TextComponent.
Methods inherited from Component
Methods included from ViewHelper
#anchor_form_with, #anchor_svg, #deep_blank?, #merge_options, #popover_trigger_attributes
Methods included from FetchOrFallbackHelper
Constructor Details
#initialize(tag: TAG_DEFAULT, **kwargs) ⇒ TextComponent
Returns a new instance of TextComponent.
21 22 23 24 |
# File 'app/components/anchor/text_component.rb', line 21 def initialize(tag: TAG_DEFAULT, **kwargs) @tag = tag super(**kwargs) end |