You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
378 B
JavaScript

'use client';
import getThemeProps from './getThemeProps';
import useTheme from '../useTheme';
export default function useThemeProps({
props,
name,
defaultTheme,
themeId
}) {
let theme = useTheme(defaultTheme);
if (themeId) {
theme = theme[themeId] || theme;
}
const mergedProps = getThemeProps({
theme,
name,
props
});
return mergedProps;
}