Skip to content

Commit 708bfa6

Browse files
dmbln34gabrieljablonski
authored andcommitted
feat: use AriaRole type
1 parent 5efd0fe commit 708bfa6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/docs/options.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ import { Tooltip } from 'react-tooltip';
130130
| `opacity` | CSS opacity | no | `0.9` | a CSS opacity value | Change the opacity of the tooltip |
131131
| `arrowColor` | CSS color | no | | a CSS background color | Change color of the tooltip arrow |
132132
| `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 |
133-
| `role` | `'tooltip'` or `'dialog'` | no | `tooltip` | `'tooltip'` `'dialog'` | Set ARIA role, either `tooltip` or `dialog` if the tooltip should contain focusable elements |
133+
| `role` | React.AriaRole | no | `tooltip` | `'tooltip'` `'dialog'` | Set ARIA role, either `tooltip` or `dialog` if the tooltip should contain focusable elements |

src/components/Tooltip/TooltipTypes.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,5 @@ export interface ITooltip {
153153
border?: CSSProperties['border']
154154
opacity?: CSSProperties['opacity']
155155
arrowColor?: CSSProperties['backgroundColor']
156-
role?: 'tooltip' | 'dialog'
156+
role?: React.AriaRole
157157
}

src/components/TooltipController/TooltipControllerTypes.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export interface ITooltipController {
9393
setIsOpen?: (value: boolean) => void
9494
afterShow?: () => void
9595
afterHide?: () => void
96-
role?: 'tooltip' | 'dialog'
96+
role?: React.AriaRole
9797
}
9898

9999
declare module 'react' {

0 commit comments

Comments
 (0)