mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add unistyles
This commit is contained in:
27
apps/cli/templates/frontend/native/unistyles/unistyles.ts
Normal file
27
apps/cli/templates/frontend/native/unistyles/unistyles.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { StyleSheet } from 'react-native-unistyles';
|
||||
|
||||
import { breakpoints } from './breakpoints';
|
||||
import { lightTheme, darkTheme } from './theme';
|
||||
|
||||
type AppBreakpoints = typeof breakpoints;
|
||||
|
||||
type AppThemes = {
|
||||
light: typeof lightTheme;
|
||||
dark: typeof darkTheme;
|
||||
};
|
||||
|
||||
declare module 'react-native-unistyles' {
|
||||
export interface UnistylesBreakpoints extends AppBreakpoints {}
|
||||
export interface UnistylesThemes extends AppThemes {}
|
||||
}
|
||||
|
||||
StyleSheet.configure({
|
||||
breakpoints,
|
||||
themes: {
|
||||
light: lightTheme,
|
||||
dark: darkTheme,
|
||||
},
|
||||
settings: {
|
||||
adaptiveThemes: true,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user