Skip to content

feat(components): shared Heading Twig component for H1-H6 #92

Description

@martinydeAI

Resume

Description

Several templates (templates/security/login.html.twig,
templates/profile/show.html.twig, templates/profile/edit.html.twig,
templates/components/Hero.html.twig, templates/assistant/show.html.twig)
all hand-roll the same <h1> markup with font-display text-[clamp(...)] font-medium leading-tight tracking-tight text-ink
classes. Extract a shared Heading Twig component that picks the
right HTML tag (h1h6) from a prop and centralises the design
tokens.

Tasks

  • Add templates/components/Heading.html.twig accepting a
    level prop (16) and rendering the corresponding tag.
  • Support size/variant props if call-sites need more than one
    visual treatment (e.g. hero vs. section heading).
  • Refactor existing call-sites to use the component.

Details - AI specificities

  • Raised on PR feat(profile): self-service profile show + edit (#13) #89 review.
  • Existing duplicated markup: see the templates listed above.
  • Keep Tailwind classes co-located in the component so the design
    tokens have a single source of truth.
  • Components live under templates/components/ and are invoked via
    <twig:Name ...> (Twig Components bundle).

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions