Skip to content

Commit 1bfbc8a

Browse files
linting
1 parent 5002f33 commit 1bfbc8a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/rules/a11y-use-next-tooltip.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@ import {Tooltip} from '@primer/react/next'
1919

2020
Even though the below code is perfectly valid, since icon buttons now come with tooltips by default, it is not required to explicitly use the Tooltip component on icon buttons.
2121

22-
```tsx
22+
```jsx
2323
import {IconButton} from '@primer/react'
2424
import {Tooltip} from '@primer/react/next'
25-
<Tooltip text="Search" direction="e">
26-
<IconButton icon={SearchIcon} aria-label="Search" />
27-
</Tooltip>
25+
26+
function ExampleComponent() {
27+
return (
28+
<Tooltip text="Search" direction="e">
29+
<IconButton icon={SearchIcon} aria-label="Search" />
30+
</Tooltip>
31+
)
32+
}
2833
```

0 commit comments

Comments
 (0)