Skip to content

Commit

Permalink
feat: use AriaRole type
Browse files Browse the repository at this point in the history
  • Loading branch information
Dang, Mai-Linh authored and gabrieljablonski committed Nov 21, 2023
1 parent 5efd0fe commit 708bfa6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/docs/options.mdx
Expand Up @@ -130,4 +130,4 @@ import { Tooltip } from 'react-tooltip';
| `opacity` | CSS opacity | no | `0.9` | a CSS opacity value | Change the opacity of the tooltip |
| `arrowColor` | CSS color | no | | a CSS background color | Change color of the tooltip arrow |
| `disableStyleInjection` | `boolean` or `'core'` | no | `false` | `true` `false` `'core'` | Whether to disable automatic style injection. Do not set dynamically. Check the [styling page](./examples/styling#disabling-reacttooltip-css) for more details |
| `role` | `'tooltip'` or `'dialog'` | no | `tooltip` | `'tooltip'` `'dialog'` | Set ARIA role, either `tooltip` or `dialog` if the tooltip should contain focusable elements |
| `role` | React.AriaRole | no | `tooltip` | `'tooltip'` `'dialog'` | Set ARIA role, either `tooltip` or `dialog` if the tooltip should contain focusable elements |
2 changes: 1 addition & 1 deletion src/components/Tooltip/TooltipTypes.d.ts
Expand Up @@ -153,5 +153,5 @@ export interface ITooltip {
border?: CSSProperties['border']
opacity?: CSSProperties['opacity']
arrowColor?: CSSProperties['backgroundColor']
role?: 'tooltip' | 'dialog'
role?: React.AriaRole
}
Expand Up @@ -93,7 +93,7 @@ export interface ITooltipController {
setIsOpen?: (value: boolean) => void
afterShow?: () => void
afterHide?: () => void
role?: 'tooltip' | 'dialog'
role?: React.AriaRole
}

declare module 'react' {
Expand Down

0 comments on commit 708bfa6

Please sign in to comment.