Skip to content

Commit a0715ee

Browse files
authored
Replace JSX.IntrinsicElements with React.JSX.IntrinsicElements (#4012)
Fixes #4011. This is for compatibility with React v19, where the global JSX namespace went away.
1 parent 0e0cf9e commit a0715ee

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

packages/formik/src/types.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,9 @@ export interface SharedRenderProps<T> {
279279
}
280280

281281
export type GenericFieldHTMLAttributes =
282-
| JSX.IntrinsicElements['input']
283-
| JSX.IntrinsicElements['select']
284-
| JSX.IntrinsicElements['textarea'];
282+
| React.JSX.IntrinsicElements['input']
283+
| React.JSX.IntrinsicElements['select']
284+
| React.JSX.IntrinsicElements['textarea'];
285285

286286
/** Field metadata */
287287
export interface FieldMetaProps<Value> {

website/src/components/Container.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import cn from 'classnames';
33
import { HTMLProps } from 'react';
44

5-
export const Container: React.FC<JSX.IntrinsicElements['div']> = ({
5+
export const Container: React.FC<React.JSX.IntrinsicElements['div']> = ({
66
className,
77
...props
88
}) => {

website/src/components/FormiumLogo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
export const FormiumLogo: React.FC<JSX.IntrinsicElements['svg']> = props => {
3+
export const FormiumLogo: React.FC<React.JSX.IntrinsicElements['svg']> = props => {
44
return (
55
<svg
66
width={'101px'}

website/src/components/forwardRefWithAs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export function forwardRefWithAs<Props, ComponentType extends As>(
9696
Test components to make sure our dynamic As prop components work as intended
9797
type PopupProps = {
9898
lol: string;
99-
children?: React.ReactNode | ((value?: number) => JSX.Element);
99+
children?: React.ReactNode | ((value?: number) => React.JSX.Element);
100100
};
101101
export const Popup = forwardRefWithAs<PopupProps, 'input'>(
102102
({ as: Comp = 'input', lol, className, children, ...props }, ref) => {

0 commit comments

Comments
 (0)