@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
17 lines (14 loc) • 651 B
JavaScript
'use client';
import { filterProps } from '../../utils/filter-props/filter-props.mjs';
import 'react';
import 'react/jsx-runtime';
import '@mantine/hooks';
import { useMantineTheme } from '../MantineThemeProvider/MantineThemeProvider.mjs';
function useProps(component, defaultProps, props) {
const theme = useMantineTheme();
const contextPropsPayload = theme.components[component]?.defaultProps;
const contextProps = typeof contextPropsPayload === "function" ? contextPropsPayload(theme) : contextPropsPayload;
return { ...defaultProps, ...contextProps, ...filterProps(props) };
}
export { useProps };
//# sourceMappingURL=use-props.mjs.map