mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-18 09:35:20 +02:00
13 lines
354 B
TypeScript
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;
|