Skip to content

feat: refactor heading to support styles as

Administrator requested to merge contractors/heading-styles-as into main

Created by: gitstart-sourcegraph

Problem Description

To achieve the first requirements of #34741 (closed), we need to create an internal support for Hx to be styled as Hy, within the wildcard header components.

Description

  • Support styleAs property in heading components, this would help to perform rendering h2 with h1 style. Using <H2 as={H1} /> couldn't do it since h2 css class has higher priority than h1

Test plan

  • There should be no UI changes + unit test snapshot changes

Ref

https://github.com/sourcegraph/sourcegraph/issues/34741

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading