Skip to content

Update Subtitle to Support h2-h6 Tags #742

Open
@SpaNb4

Description

@SpaNb4

📝 Describe the feature

Subtitle component currently only renders an h3 tag.
The component should accept a new prop, for example, headingLevel (or similar, such as as), which is a string specifying the heading tag to be rendered. The component will default to h3 if this prop is not provided.

✅ Definition of Done (DoD):

  • New headingLevel Prop: The Subtitle component accepts a new prop named headingLevel (or as if preferable) as a string to specify the heading tag to be rendered. Valid values are h2, h3, h4, h5, and h6.
  • Default h3: If the headingLevel prop is not provided, the component should default to rendering an h3 tag.
  • Refactoring: All existing instances of the Subtitle component in the codebase have been reviewed and refactored to use the headingLevel prop where necessary and maintain all the existing styling.
  • Unit tests: New unit tests should be added to ensure that the new headingLevel prop behaves as expected with different heading levels.
  • No Styling Breaks: The current style of the subtitles doesn't break on any usage

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

Status

Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions