Skip to content

Commit 60041fc

Browse files
kiner-tangtangwenhui1
andauthored
chore: update aria type (#77)
Co-authored-by: tangwenhui1 <[email protected]>
1 parent c1985ea commit 60041fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/interface.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ export type SemanticName =
1313
| 'description'
1414
| 'mask';
1515

16+
17+
export type HTMLAriaDataAttributes = React.AriaAttributes & {
18+
[key: `data-${string}`]: unknown;
19+
} & Pick<React.HTMLAttributes<HTMLDivElement>, 'role'>;
20+
1621
export interface TourStepInfo {
1722
arrow?: boolean | { pointAtCenter: boolean };
1823
target?: HTMLElement | (() => HTMLElement) | null | (() => null);
@@ -30,7 +35,7 @@ export interface TourStepInfo {
3035
style?: CSSProperties;
3136
scrollIntoViewOptions?: boolean | ScrollIntoViewOptions;
3237
closeIcon?: ReactNode;
33-
closable?: boolean | ({ closeIcon?: ReactNode } & React.AriaAttributes);
38+
closable?: boolean | ({ closeIcon?: ReactNode } & HTMLAriaDataAttributes);
3439
}
3540

3641
export interface TourStepProps extends TourStepInfo {

0 commit comments

Comments
 (0)