1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-18 09:35:20 +02:00
joplin/packages/app-mobile/components/useStyles.ts
2022-09-09 15:06:03 +01:00

13 lines
354 B
TypeScript

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;