@chakra-ui/react-types
Advanced tools
Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "@chakra-ui/react-types", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "", | ||
@@ -34,4 +34,3 @@ "keywords": [ | ||
"react": "^18.0.0" | ||
}, | ||
"readme": "# @chakra-ui/react-types\n\nA Quick description of the component\n\n> This is an internal utility, not intended for public usage.\n\n## Installation\n\n```sh\nyarn add @chakra-ui/react-types\n# or\nnpm i @chakra-ui/react-types\n```\n\n## Contribution\n\nYes please! See the\n[contributing guidelines](https://github.com/chakra-ui/chakra-ui/blob/master/CONTRIBUTING.md)\nfor details.\n\n## Licence\n\nThis project is licensed under the terms of the\n[MIT license](https://github.com/chakra-ui/chakra-ui/blob/master/LICENSE).\n" | ||
} | ||
} |
@@ -58,3 +58,3 @@ export interface AriaLabelingProps { | ||
type DataAttributes = { | ||
[K in `data-${string}`]?: string | boolean | number | null | ||
[dataAttr: string]: any | ||
} | ||
@@ -73,10 +73,19 @@ | ||
export type PropGetter<P = Record<string, any>, R = DOMAttributes> = ( | ||
props?: DOMAttributes & P, | ||
type Merge<M, N> = N extends Record<string, unknown> ? M : Omit<M, keyof N> & N | ||
export type PropGetter<P = Record<string, unknown>, R = DOMAttributes> = ( | ||
props?: Merge<DOMAttributes, P>, | ||
ref?: React.Ref<any>, | ||
) => R & React.RefAttributes<any> | ||
export type RequiredPropGetter<P = Record<string, any>, R = DOMAttributes> = ( | ||
props: DOMAttributes & P, | ||
export type RequiredPropGetter< | ||
P = Record<string, unknown>, | ||
R = DOMAttributes, | ||
> = ( | ||
props: Merge<DOMAttributes, P>, | ||
ref?: React.Ref<any>, | ||
) => R & React.RefAttributes<any> | ||
export type MaybeRenderProp<P> = | ||
| React.ReactNode | ||
| ((props: P) => React.ReactNode) |
77
4527