Created
September 11, 2020 14:06
-
-
Save montogeek/6351c123150fca46cce81022841ec344 to your computer and use it in GitHub Desktop.
React MaterialUIHueOverlay
This file contains hidden or 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 useOverlayStyles = makeStyles((theme) => { | |
return { | |
blended: { | |
mixBlendMode: 'hue', | |
backgroundColor: theme.palette.primary.main, | |
position: 'absolute', | |
top: -4, // To include the border | |
right: 0, | |
bottom: 0, | |
left: 0, | |
content: ' ', | |
zIndex: theme.zIndex.tooltip, | |
}, | |
}; | |
}); | |
export function ThemeOverlay() { | |
const classes = useOverlayStyles(); | |
const theme = useTheme(); | |
if (theme.name !== 'Caspar') { | |
return <Box className={classes.blended} />; | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment