Skip to content

Commit

Permalink
chore: run format
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack committed Oct 12, 2023
1 parent fee7f16 commit f903c06
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/rules/a11y-explicit-heading.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,29 @@ enforces `as` usage to only be used for headings.
```jsx
import {Heading} from '@primer/react'

;<Heading>Heading without explicit heading level</Heading>
function ExampleComponent() {
return <Heading>Heading without explicit heading level</Heading>
}
```

`as` must only be for headings (`h1`-`h6`)

```jsx
import {Heading} from '@primer/react'

;<Heading as="span">Heading component used as "span"</Heading>
function ExampleComponent() {
return <Heading as="span">Heading component used as "span"</Heading>
}
```

👍 Examples of **correct** code for this rule:

```jsx
import {Heading} from '@primer/react'

;<Heading as="h2">Heading level 2</Heading>
function ExampleComponent() {
return <Heading as="h2">Heading level 2</Heading>
}
```

## Options
Expand Down

0 comments on commit f903c06

Please sign in to comment.