diff --git a/CHANGELOG.md b/CHANGELOG.md index c15f9007..c3510153 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.7.5](https://www.github.com/daisyui/react-daisyui/compare/v1.7.4...v1.7.5) (2022-04-05) + + +### Bug Fixes + +* removed polymorphic typing from types.ts ([0000986](https://www.github.com/daisyui/react-daisyui/commit/00009869c60c0752817bbaf8f2d90c434784753e)) + ### [1.7.4](https://www.github.com/daisyui/react-daisyui/compare/v1.7.3...v1.7.4) (2022-04-05) diff --git a/package-lock.json b/package-lock.json index 3cc89944..8fdc1a2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-daisyui", - "version": "1.7.4", + "version": "1.7.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "react-daisyui", - "version": "1.7.4", + "version": "1.7.5", "license": "MIT", "devDependencies": { "@babel/core": "^7.16.0", diff --git a/package.json b/package.json index 6d4f6bba..bd532c77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-daisyui", - "version": "1.7.4", + "version": "1.7.5", "description": "react-daisyui - DaisyUI components built with React 🌼", "author": "daisyui", "license": "MIT", diff --git a/src/Alert/Alert.tsx b/src/Alert/Alert.tsx index fbed84dc..423ca6ff 100644 --- a/src/Alert/Alert.tsx +++ b/src/Alert/Alert.tsx @@ -6,7 +6,6 @@ import { IComponentBaseProps, ComponentStatus } from '../types' export type AlertProps = React.HTMLAttributes & IComponentBaseProps & { - children?: ReactNode | ReactNode[] icon?: ReactNode status?: ComponentStatus } diff --git a/src/Artboard/Artboard.tsx b/src/Artboard/Artboard.tsx index 11f23ab3..f81991c7 100644 --- a/src/Artboard/Artboard.tsx +++ b/src/Artboard/Artboard.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, ReactNode } from 'react' +import React, { forwardRef } from 'react' import clsx from 'clsx' import { twMerge } from 'tailwind-merge' @@ -6,7 +6,6 @@ import { IComponentBaseProps } from '../types' export type ArtboardProps = React.HTMLAttributes & IComponentBaseProps & { - children?: ReactNode | ReactNode[] size?: 1 | 2 | 3 | 4 | 5 | 6 horizontal?: boolean } diff --git a/src/Divider/Divider.tsx b/src/Divider/Divider.tsx index 61d656f0..1f1e5464 100644 --- a/src/Divider/Divider.tsx +++ b/src/Divider/Divider.tsx @@ -6,7 +6,6 @@ import { IComponentBaseProps } from '../types' export type DividerProps = React.HTMLAttributes & IComponentBaseProps & { - children?: string vertical?: boolean } diff --git a/src/Link/Link.tsx b/src/Link/Link.tsx index 455807ba..2fa93f2a 100644 --- a/src/Link/Link.tsx +++ b/src/Link/Link.tsx @@ -6,8 +6,6 @@ import { IComponentBaseProps, ComponentColor } from '../types' export type LinkProps = React.AnchorHTMLAttributes & IComponentBaseProps & { - children: string - href?: string color?: 'neutral' | ComponentColor hover?: boolean } diff --git a/src/Modal/Modal.tsx b/src/Modal/Modal.tsx index 2eddd8d4..8a551c34 100644 --- a/src/Modal/Modal.tsx +++ b/src/Modal/Modal.tsx @@ -13,7 +13,6 @@ export type ModalRef = { export type ModalProps = React.HTMLAttributes & IComponentBaseProps & { - children?: ReactNode | ReactNode[] open?: boolean title?: string footer?: boolean diff --git a/src/Tabs/Tab.tsx b/src/Tabs/Tab.tsx index 83d1bfb9..2b84a164 100644 --- a/src/Tabs/Tab.tsx +++ b/src/Tabs/Tab.tsx @@ -1,25 +1,19 @@ -import React, { ReactNode } from 'react' +import React from 'react' import clsx from 'clsx' import { twMerge } from 'tailwind-merge' import { ComponentSize } from '../types' -export type TabProps = { - children?: ReactNode | ReactNode[] +export type TabProps = React.AnchorHTMLAttributes & { value: T activeValue?: T onClick?: (value: T) => void size?: ComponentSize variant?: 'bordered' | 'lifted' - className?: string - style?: Record } const TabInner = ( - props: TabProps, - ref?: React.ForwardedRef -): JSX.Element => { - const { + { children, value, activeValue, @@ -28,9 +22,10 @@ const TabInner = ( variant, className, style, - ...rest - } = props - + ...props + }: TabProps, + ref?: React.ForwardedRef +): JSX.Element => { const classes = twMerge( 'tab', className, @@ -44,7 +39,7 @@ const TabInner = ( return ( onClick && onClick(value)}