Skip to content

Instantly share code, notes, and snippets.

@salvadorGlez
Last active April 27, 2021 18:36
Show Gist options
  • Save salvadorGlez/e54261758aad343810c9d2fd06986019 to your computer and use it in GitHub Desktop.
Save salvadorGlez/e54261758aad343810c9d2fd06986019 to your computer and use it in GitHub Desktop.
This is a Snippet for the styles used in Material UI
{
	"Styles": {
		"prefix": "mstyles",
		"body": [
			"import { makeStyles, createStyles } from '@material-ui/core/styles';",
			"//import useMediaQuery from '@material-ui/core/useMediaQuery';",
			"",
			"export const useStyles =  (props = {}) => {",
			"    //const matches = useMediaQuery('(min-width:450px)');",
			"    const styles = makeStyles((theme) =>",
			"        createStyles({",
			"            ${0:here goes the styles}",
			"        })",
			"    );",
			"    return styles();",
			"}",
			""
		],
		"description": "This is a Snippet for the styles used in Material UI"
	}	
}
@ALEXOTANO
Copy link

Nice Job!!

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