Skip to content

Instantly share code, notes, and snippets.

@kof
Last active November 23, 2021 08:13
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kof/43ac135686c71c536deb0db61b94e6e3 to your computer and use it in GitHub Desktop.
Save kof/43ac135686c71c536deb0db61b94e6e3 to your computer and use it in GitHub Desktop.
Inject styles with custom hooks
const styles = {
button: {
color: 'red'
}
}
const Button = () => {
const {classes} = useStyles(styles)
return <button className={classes.button}>Test<Button>
}
@vapstor
Copy link

vapstor commented Aug 22, 2020

how can i use a hook from inside a separate style file ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment