Skip to content

Commit

Permalink
Merge pull request #392 from kaisermann/fix-jsx-ref
Browse files Browse the repository at this point in the history
Replace JSX.Element with React.ReactElement
  • Loading branch information
timolins authored Feb 3, 2025
2 parents 3823791 + dedece2 commit 51d78b5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion site/components/emoji-button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const EmojiButton: React.FC<{
onClick: () => void;
emoji: string | JSX.Element;
emoji: string | React.ReactElement;
children?: React.ReactNode;
}> = ({ onClick, children, emoji }) => (
<button
Expand Down
2 changes: 1 addition & 1 deletion site/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Step: React.FC<{
count: number;
title: string;
subTitle: string;
code: JSX.Element;
code: React.ReactElement;
}> = (props) => (
<div className="flex flex-col gap-1 items-center">
<div className="h-6 w-6 mb-2 text-sm rounded-full bg-toast-900 text-toast-50 flex items-center justify-center">
Expand Down
2 changes: 1 addition & 1 deletion site/types/mdx.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module '*.mdx' {
let MDXComponent: (props: any) => JSX.Element;
let MDXComponent: (props: any) => React.ReactElement;
export default MDXComponent;
}
4 changes: 2 additions & 2 deletions src/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type ToastPosition =
| 'bottom-center'
| 'bottom-right';

export type Renderable = JSX.Element | string | null;
export type Renderable = React.ReactElement | string | null;

export interface IconTheme {
primary: string;
Expand Down Expand Up @@ -82,7 +82,7 @@ export interface ToasterProps {
gutter?: number;
containerStyle?: React.CSSProperties;
containerClassName?: string;
children?: (toast: Toast) => JSX.Element;
children?: (toast: Toast) => React.ReactElement;
}

export interface ToastWrapperProps {
Expand Down

0 comments on commit 51d78b5

Please sign in to comment.