From ac1a6aa5502041c687a972a1b21c67dca6c2892b Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 5 Jun 2024 11:30:51 -0400 Subject: [PATCH] Downgrade JSX transform to support react 16 (#1) --- package.json | 2 +- src/ZodErrorViewer.test.tsx | 1 + src/ZodErrorViewer.tsx | 1 + tsconfig.json | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3099c33..2abfcf8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zod-error-viewer", - "version": "1.2.0", + "version": "1.2.1", "license": "MIT", "author": { "name": "Ben Lorantfy", diff --git a/src/ZodErrorViewer.test.tsx b/src/ZodErrorViewer.test.tsx index 96916f0..170054d 100644 --- a/src/ZodErrorViewer.test.tsx +++ b/src/ZodErrorViewer.test.tsx @@ -1,5 +1,6 @@ // @vitest-environment happy-dom +import * as React from "react"; import { test, expect, beforeEach } from "vitest"; import Meta, * as stories from "./ZodErrorViewer.stories"; import { composeStories } from "@storybook/react"; diff --git a/src/ZodErrorViewer.tsx b/src/ZodErrorViewer.tsx index 9e989f6..bc32461 100644 --- a/src/ZodErrorViewer.tsx +++ b/src/ZodErrorViewer.tsx @@ -1,5 +1,6 @@ "use client"; +import * as React from "react"; import { type CSSProperties, useState, useMemo, useRef } from "react"; import { flushSync } from "react-dom"; import { z, ZodError, ZodIssue, ZodIssueCode } from "zod"; diff --git a/tsconfig.json b/tsconfig.json index e033b41..2b0f869 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react-jsx", + "jsx": "react", /* Linting */ "strict": true,