Advertisement
ZeroSeventty

component with makesStyles hook

Jun 3rd, 2021
1,053
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.      "Material UI basic base": {  //Short description of the snippet
  3.     "prefix": "mrafce", //Command to trigger
  4.     "body": [ // Code to build using the prefix
  5.         "import React from 'react'",
  6.         "import { useState, useEffect } from 'react'",
  7.         "import { makeStyles } from '@material-ui/core'",
  8.         "",
  9.         "const useStyles = makeStyles((theme) => ({",
  10.         "root: {",
  11.         "$1",      
  12.         "},",
  13.         "}));",
  14.        
  15.         "const $2 = () => {",
  16.             "const classes = useStyles();",
  17.        
  18.             "return (",
  19.                 "<div>",
  20.                     "<p>Hellow dev</p>",
  21.                 "</div>",
  22.             ")",
  23.         "}",
  24.        
  25.         "export default $0",
  26.     ],
  27.         "description": "This is a snippet to build a basic component with makeStyles hook"
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement