Created
June 8, 2022 19:56
-
-
Save alansouzati/1a685d3de488399b8467f6a66aabe37d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lightTheme = createTheme({ | |
palette: { | |
daysToClose: { | |
contrastText: “white”, | |
main: “#444444” | |
}, | |
appBackground: { | |
main: “#e3e3e3”, | |
contrastText: “#444444” | |
} | |
} | |
}); | |
const darkTheme = createTheme({ | |
palette: { | |
mode: ‘dark’, | |
daysToClose: { | |
contrastText: “white”, | |
main: “#444444” | |
}, | |
appBackground: { | |
main: “black”, | |
contrastText: “white” | |
}, | |
text: { | |
secondary: “#e3e3e3” | |
} | |
} | |
}); | |
export default function App() { | |
const body = ( | |
<Box | |
display=”flex” | |
backgroundColor=”appBackground.main” | |
color=”appBackground.contrastText” | |
padding=”12px” | |
justifyContent=”space-between” | |
> | |
<Typography>123 Test</Typography> | |
<Box backgroundColor=”daysToClose.main” color=”daysToClose.contrastText”> | |
<ThemeProvider theme={darkTheme}> | |
<Typography>10</Typography> | |
<Typography color=”text.secondary” variant=”body2″> | |
days to close | |
</Typography> | |
</ThemeProvider> | |
</Box> | |
</Box> | |
); | |
return ( | |
<Box display=”flex” gap=”24px” flexDirection=”column”> | |
<ThemeProvider theme={lightTheme}>{body}</ThemeProvider> | |
<ThemeProvider theme={darkTheme}>{body}</ThemeProvider> | |
</Box> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment