Class: Protos::Typography::Heading

Inherits:
Component
  • Object
show all
Defined in:
lib/protos/typography/heading.rb

Constant Summary collapse

Sizes =

DOCS: A heading component that encapsulates all heading levels by their size and level.

Types::Coercible::Symbol.enum(:xs, :sm, :md, :lg, :xl)
Levels =
Types::Integer.enum(1, 2, 3, 4, 5, 6)
SIZES =
{
  xs: "text-lg font-medium",
  sm: "text-xl font-medium",
  md: "text-2xl font-semibold",
  lg: "text-3xl font-semibold md:text-4xl",
  xl: "text-4xl font-bold md:text-5xl"
}.freeze

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#view_templateObject



23
24
25
# File 'lib/protos/typography/heading.rb', line 23

def view_template(&)
  send(element, **attrs, &)
end