Skip to content

Commit

Permalink
fix: replace deprecated JSX global types (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletsang authored Dec 15, 2024
1 parent 469ccc6 commit 62ea59f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface UseButtonPropsOptions extends AnchorOptions {
disabled?: boolean;
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
tabIndex?: number;
tagName?: keyof JSX.IntrinsicElements;
tagName?: keyof React.JSX.IntrinsicElements;
role?: React.AriaRole | undefined;
}

Expand Down Expand Up @@ -113,7 +113,7 @@ export interface BaseButtonProps {
* Control the underlying rendered element directly by passing in a valid
* component type
*/
as?: keyof JSX.IntrinsicElements | undefined;
as?: keyof React.JSX.IntrinsicElements | undefined;

/** The disabled state of the button */
disabled?: boolean | undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';

export type EventKey = string | number;

export type IntrinsicElementTypes = keyof JSX.IntrinsicElements;
export type IntrinsicElementTypes = keyof React.JSX.IntrinsicElements;

export type AssignPropsWithRef<
Inner extends string | React.ComponentType<any>,
Expand Down

0 comments on commit 62ea59f

Please sign in to comment.