Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace deprecated JSX global types #113

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading