1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-05 12:50:29 +02:00
joplin/packages/app-mobile/components/useStyles.ts

13 lines
354 B
TypeScript
Raw Normal View History

2022-09-09 16:06:03 +02:00
import { StyleSheet } from 'react-native';
import { Style } from './global-style';
import { themeStyle } from './global-style';
const useStyles = (stylingFunction: (theme: Style)=> Style, themeId?: number) => {
const theme = themeStyle(themeId);
const styles = stylingFunction(theme);
return StyleSheet.create(styles);
};
export default useStyles;