1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-03 23:50:33 +02:00
Files
joplin/packages/app-mobile/components/useStyles.ts

13 lines
354 B
TypeScript
Raw Normal View History

2022-09-09 15:06:03 +01: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;