From 652a5da0bbf6058da960dde47d4cfcb15c7847f1 Mon Sep 17 00:00:00 2001 From: Andrey Yamanov Date: Fri, 30 Aug 2024 10:27:47 +0200 Subject: [PATCH] chore: improve compatibility with react 18 --- .changeset/dry-penguins-drive.md | 5 +++++ src/tasty/types.ts | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .changeset/dry-penguins-drive.md diff --git a/.changeset/dry-penguins-drive.md b/.changeset/dry-penguins-drive.md new file mode 100644 index 00000000..bd840910 --- /dev/null +++ b/.changeset/dry-penguins-drive.md @@ -0,0 +1,5 @@ +--- +'@cube-dev/ui-kit': minor +--- + +Improve compatibility with React 18 in some cases. diff --git a/src/tasty/types.ts b/src/tasty/types.ts index 355075d7..62ea60fc 100644 --- a/src/tasty/types.ts +++ b/src/tasty/types.ts @@ -1,4 +1,4 @@ -import { AllHTMLAttributes, CSSProperties } from 'react'; +import { AllHTMLAttributes, CSSProperties, PropsWithChildren } from 'react'; import { Styles } from './styles/types'; import { @@ -80,8 +80,7 @@ export interface BasePropsWithoutChildren } export interface BaseProps - extends BasePropsWithoutChildren, - Pick, 'children'> {} + extends PropsWithChildren {} export interface AllBaseProps extends BaseProps,