UNPKG

flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS

1 lines 1.16 kB
{"version":3,"file":"resolve-props.cjs","sources":["../../src/helpers/resolve-props.ts"],"sourcesContent":["import { withoutThemingProps } from \"./without-theming-props\";\n\n/**\n * Resolves and merges component props with provider props while removing theming-related properties\n *\n * @template T - The type of the component props\n * @param {T} props - The component props to resolve\n * @param {unknown} [providerProps] - Optional provider props to merge with component props\n * @returns {ReturnType<typeof withoutThemingProps<T>>} The merged props with theming properties removed\n */\nexport function resolveProps<T>(props: T, providerProps?: unknown): ReturnType<typeof withoutThemingProps<T>> {\n let mergedProps = withoutThemingProps(props);\n\n if (providerProps) {\n mergedProps = {\n ...providerProps,\n ...props,\n };\n }\n\n return mergedProps;\n}\n"],"names":["withoutThemingProps"],"mappings":";;;;AAEO,SAAS,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE;AACnD,EAAE,IAAI,WAAW,GAAGA,uCAAmB,CAAC,KAAK,CAAC;AAC9C,EAAE,IAAI,aAAa,EAAE;AACrB,IAAI,WAAW,GAAG;AAClB,MAAM,GAAG,aAAa;AACtB,MAAM,GAAG;AACT,KAAK;AACL;AACA,EAAE,OAAO,WAAW;AACpB;;;;"}