pull/52/head
parent
1e965a011e
commit
faf141db42
@ -0,0 +1,10 @@
|
||||
const COLORS = {
|
||||
primary:'#0064E0',
|
||||
secondary:'',
|
||||
tertiary:'',
|
||||
|
||||
white: '#fff',
|
||||
black: '#000',
|
||||
}
|
||||
|
||||
export default COLORS;
|
@ -0,0 +1,13 @@
|
||||
// theme.js
|
||||
const theme = {
|
||||
colors: {
|
||||
primary: '#0064E0',
|
||||
secondary: '#0052B8',
|
||||
|
||||
text: '#fff'
|
||||
|
||||
//faire une gestion dark/light
|
||||
},
|
||||
};
|
||||
|
||||
export default theme;
|
@ -0,0 +1,15 @@
|
||||
// ThemeContext.js
|
||||
import React, { createContext, useContext } from 'react';
|
||||
import theme from './Theme';
|
||||
|
||||
const ThemeContext = createContext(theme);
|
||||
|
||||
export const useTheme = () => useContext(ThemeContext);
|
||||
|
||||
//@ts-ignore
|
||||
export const ThemeProvider = ({ children }) => (
|
||||
<ThemeContext.Provider value={theme}>{children}</ThemeContext.Provider>
|
||||
);
|
||||
|
||||
|
||||
//* style={{ color: theme.colors.primary }}
|
Loading…
Reference in new issue