Last active
March 7, 2019 09:31
-
-
Save madflanderz/0ed0c39664b7c7cc0bf468f1ef8982fe to your computer and use it in GitHub Desktop.
React Component Material UI
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
import * as React from 'react' | |
import { Theme } from '@material-ui/core/styles' | |
import { makeStyles } from '@material-ui/styles'; | |
const useStyles = makeStyles(({ palette }: Theme) => ({ | |
root: { | |
// backgroundColor: palette.primary, | |
}, | |
}), | |
{ name: 'MyComponent' } | |
) | |
interface Props { | |
title: string | |
} | |
const MyComponent = ({title}: Props) => { | |
const c = useStyles() | |
return <div className={c.root}></div> | |
} | |
export default MyComponent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment