File tree Expand file tree Collapse file tree 2 files changed +44
-38
lines changed
packages/react/src/live-region Expand file tree Collapse file tree 2 files changed +44
-38
lines changed Original file line number Diff line number Diff line change 1
1
import React , { type ElementType } from 'react'
2
2
import { Announce } from './Announce'
3
+ import type { SxProp } from '../sx'
3
4
4
- export type AriaAlertProps < As extends ElementType > = React . PropsWithChildren < {
5
- /**
6
- * Customize the element type of the rendered container
7
- */
8
- as ?: As
5
+ export type AriaAlertProps < As extends ElementType > = React . PropsWithChildren <
6
+ {
7
+ /**
8
+ * Customize the element type of the rendered container
9
+ */
10
+ as ?: As
9
11
10
- /**
11
- * Specify if the content of the element should be announced when this
12
- * component is rendered and is not hidden
13
- * @default true
14
- */
15
- announceOnShow ?: boolean
12
+ /**
13
+ * Specify if the content of the element should be announced when this
14
+ * component is rendered and is not hidden
15
+ * @default true
16
+ */
17
+ announceOnShow ?: boolean
16
18
17
- /**
18
- * Specify if the element is hidden
19
- * @default false
20
- */
21
- hidden ?: boolean
22
- } >
19
+ /**
20
+ * Specify if the element is hidden
21
+ * @default false
22
+ */
23
+ hidden ?: boolean
24
+ } & SxProp
25
+ >
23
26
24
27
export function AriaAlert < As extends ElementType > ( {
25
28
announceOnShow = true ,
Original file line number Diff line number Diff line change 1
1
import React , { type ElementType } from 'react'
2
2
import { Announce } from './Announce'
3
+ import type { SxProp } from '../sx'
3
4
4
- export type AriaStatusProps < As extends ElementType > = React . PropsWithChildren < {
5
- /**
6
- * Customize the element type of the rendered container
7
- */
8
- as ?: As
5
+ export type AriaStatusProps < As extends ElementType > = React . PropsWithChildren <
6
+ {
7
+ /**
8
+ * Customize the element type of the rendered container
9
+ */
10
+ as ?: As
9
11
10
- /**
11
- * Specify if the content of the element should be announced when this
12
- * component is rendered and is not hidden
13
- * @default false
14
- */
15
- announceOnShow ?: boolean
12
+ /**
13
+ * Specify if the content of the element should be announced when this
14
+ * component is rendered and is not hidden
15
+ * @default false
16
+ */
17
+ announceOnShow ?: boolean
16
18
17
- /**
18
- * Specify if the element is hidden
19
- * @default false
20
- */
21
- hidden ?: boolean
19
+ /**
20
+ * Specify if the element is hidden
21
+ * @default false
22
+ */
23
+ hidden ?: boolean
22
24
23
- /**
24
- * Provide a delay in milliseconds before the announcement is made
25
- */
26
- delayMs ?: number
27
- } >
25
+ /**
26
+ * Provide a delay in milliseconds before the announcement is made
27
+ */
28
+ delayMs ?: number
29
+ } & SxProp
30
+ >
28
31
29
32
export function AriaStatus < As extends ElementType > ( {
30
33
announceOnShow = false ,
You can’t perform that action at this time.
0 commit comments