Skip to content

Commit 652a5da

Browse files
committed
chore: improve compatibility with react 18
1 parent e8837a7 commit 652a5da

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.changeset/dry-penguins-drive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': minor
3+
---
4+
5+
Improve compatibility with React 18 in some cases.

src/tasty/types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AllHTMLAttributes, CSSProperties } from 'react';
1+
import { AllHTMLAttributes, CSSProperties, PropsWithChildren } from 'react';
22

33
import { Styles } from './styles/types';
44
import {
@@ -80,8 +80,7 @@ export interface BasePropsWithoutChildren
8080
}
8181

8282
export interface BaseProps
83-
extends BasePropsWithoutChildren,
84-
Pick<AllHTMLAttributes<HTMLElementTagNameMap['div']>, 'children'> {}
83+
extends PropsWithChildren<BasePropsWithoutChildren> {}
8584

8685
export interface AllBaseProps<K extends keyof HTMLElementTagNameMap = 'div'>
8786
extends BaseProps,

0 commit comments

Comments
 (0)