This commit is contained in:
morgan
2026-03-13 19:23:37 +03:00
parent 8917f1631f
commit cc7403191a
5113 changed files with 168404 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
/**
* Add keys, values of `defaultProps` that does not exist in `props`
* @param defaultProps
* @param props
* @param mergeClassNameAndStyle If `true`, merges `className` and `style` props instead of overriding them.
* When `false` (default), props override defaultProps. When `true`, `className` values are concatenated
* and `style` objects are merged with props taking precedence.
* @returns resolved props
*/
export default function resolveProps<T extends {
components?: Record<string, unknown> | undefined;
componentsProps?: Record<string, unknown> | undefined;
slots?: Record<string, unknown> | undefined;
slotProps?: Record<string, unknown> | undefined;
className?: string | undefined;
style?: React.CSSProperties | undefined;
} & Record<string, unknown>>(defaultProps: T, props: T, mergeClassNameAndStyle?: boolean): T;