@livelike/react-native
Version:
LiveLike React Native package
27 lines • 611 B
JavaScript
import { useMemo } from 'react';
import { createStyles } from '../utils';
import { useTheme } from './useTheme';
import { useFonts } from './useFonts';
export function useStyles(_ref) {
let {
componentStylesFn,
stylesProp
} = _ref;
const {
theme
} = useTheme();
const {
fonts
} = useFonts();
const componentStyles = useMemo(() => {
return componentStylesFn({
theme,
fonts
});
}, [theme, componentStylesFn]);
return useMemo(() => createStyles({
componentStyles,
stylesProp
}), [componentStyles, stylesProp]);
}
//# sourceMappingURL=useStyles.js.map