👽 changement du token du lien de l'api et placement d'un bouton dans la top bar pour le theme, amélioré le front et voir si il est possible de rendre la mise en place du theme plus propre... 💩
parent
20e4362ef3
commit
6c1d9e7d43
@ -0,0 +1,23 @@
|
|||||||
|
// import React from 'react';
|
||||||
|
// import { SafeAreaView, StatusBar } from 'react-native';
|
||||||
|
// import ThemeContext from '../styles/themeContext';
|
||||||
|
// import theme from '../styles/theme';
|
||||||
|
// import { useSelector } from 'react-redux';
|
||||||
|
// import { lightTheme, darkTheme } from '../styles/theme';
|
||||||
|
// //@ts-ignore
|
||||||
|
// const NavigationWrapper = ({ children }) => {
|
||||||
|
|
||||||
|
// const mode = useSelector(state => state.appReducer.mode);
|
||||||
|
// const theme = mode === 'light' ? lightTheme : darkTheme;
|
||||||
|
|
||||||
|
// return (
|
||||||
|
// <SafeAreaView style={{ flex: 1 }}>
|
||||||
|
// <StatusBar />
|
||||||
|
// <ThemeContext.Provider value={theme}>
|
||||||
|
// {children}
|
||||||
|
// </ThemeContext.Provider>
|
||||||
|
// </SafeAreaView>
|
||||||
|
// );
|
||||||
|
// };
|
||||||
|
|
||||||
|
// export default NavigationWrapper;
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
|
||||||
|
export const lightTheme = {
|
||||||
|
backgroundColor: 'white',
|
||||||
|
textColor: 'black',
|
||||||
|
headerBackgroundColor: 'lightblue',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const darkTheme = {
|
||||||
|
backgroundColor: 'black',
|
||||||
|
textColor: 'white',
|
||||||
|
headerBackgroundColor: 'darkblue',
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const theme = {
|
||||||
|
backgroundColor: '#FFFFFF',
|
||||||
|
textColor: '#000000',
|
||||||
|
headerBackgroundColor: '#FFFFFF',
|
||||||
|
dark: false,
|
||||||
|
colors: {
|
||||||
|
primary: 'blue',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default theme;
|
@ -0,0 +1,6 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import theme from './theme';
|
||||||
|
|
||||||
|
const ThemeContext = React.createContext(theme);
|
||||||
|
|
||||||
|
export default ThemeContext;
|
Loading…
Reference in new issue