70d92bdd1b87956cf8d861f19c8f0fcf.json 8.2 KB

1
  1. {"ast":null,"code":"var _jsxFileName = \"/Users/holunyeung/Documents/GitHub/Photo_React/photo/src/ImageList.js\";\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport GridList from '@material-ui/core/GridList';\nimport GridListTile from '@material-ui/core/GridListTile';\nimport GridListTileBar from '@material-ui/core/GridListTileBar';\nimport ListSubheader from '@material-ui/core/ListSubheader';\nimport IconButton from '@material-ui/core/IconButton';\nimport InfoIcon from '@material-ui/icons/Info';\nimport tileData from './tileData';\nconst useStyles = makeStyles(theme => ({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-around',\n overflow: 'hidden'\n },\n gridList: {\n width: '100%',\n height: '100%'\n },\n icon: {\n color: 'rgba(255, 255, 255, 0.54)'\n }\n}));\n/**\n * The example data is structured as follows:\n *\n * import image from 'path/to/image.jpg';\n * [etc...]\n *\n * const tileData = [\n * {\n * img: image,\n * title: 'Image',\n * author: 'author',\n * cols: 2,\n * },\n * {\n * [etc...]\n * },\n * ];\n */\n\nexport default function ImageGridList() {\n const classes = useStyles();\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classes.root,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 14\n }\n }, /*#__PURE__*/React.createElement(GridList, {\n cellHeight: 140,\n className: classes.gridList,\n cols: 4,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 9\n }\n }, \" \", tileData.map(tile => /*#__PURE__*/React.createElement(GridListTile, {\n key: tile.img,\n cols: tile.cols || 1,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 38\n }\n }, /*#__PURE__*/React.createElement(\"img\", {\n src: tile.img,\n alt: tile.title,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 17\n }\n }), \" \")), \" \"), \" \");\n /*\n return ( <\n div className = { classes.root } >\n <\n GridList cellHeight = { 160 }\n className = { classes.gridList } >\n <\n GridListTile key = \"Subheader\"\n cols = { 2 }\n style = {\n { height: 'auto' }\n } >\n <\n ListSubheader component = \"div\" > December < /ListSubheader> < /\n GridListTile > {\n tileData.map((tile) => ( < GridListTile key = { tile.img }\n cols = { tile.cols || 1 } >\n <\n img src = { tile.img }\n alt = { tile.title }\n /> < /\n GridListTile >\n ))\n } <\n /GridList> < /\n div >\n );\n */\n\n /*\n return ( <\n div className = { classes.root } >\n <\n GridList cellHeight = { 140 }\n className = { classes.gridList }\n cols = { 4 } > {\n tileData.map((tile) => ( <\n GridListTile key = { tile.img }\n cols = { tile.cols || 1 } >\n <\n img src = { tile.img }\n alt = { tile.title }\n /> < /\n GridListTile >\n ))\n } <\n /GridList> < /\n div >\n );\n */\n}","map":{"version":3,"sources":["/Users/holunyeung/Documents/GitHub/Photo_React/photo/src/ImageList.js"],"names":["React","makeStyles","GridList","GridListTile","GridListTileBar","ListSubheader","IconButton","InfoIcon","tileData","useStyles","theme","root","display","flexWrap","justifyContent","overflow","gridList","width","height","icon","color","ImageGridList","classes","map","tile","img","cols","title"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,QAA2B,0BAA3B;AACA,OAAOC,QAAP,MAAqB,4BAArB;AACA,OAAOC,YAAP,MAAyB,gCAAzB;AACA,OAAOC,eAAP,MAA4B,mCAA5B;AACA,OAAOC,aAAP,MAA0B,iCAA1B;AACA,OAAOC,UAAP,MAAuB,8BAAvB;AACA,OAAOC,QAAP,MAAqB,yBAArB;AACA,OAAOC,QAAP,MAAqB,YAArB;AAEA,MAAMC,SAAS,GAAGR,UAAU,CAAES,KAAD,KAAY;AACrCC,EAAAA,IAAI,EAAE;AACFC,IAAAA,OAAO,EAAE,MADP;AAEFC,IAAAA,QAAQ,EAAE,MAFR;AAGFC,IAAAA,cAAc,EAAE,cAHd;AAIFC,IAAAA,QAAQ,EAAE;AAJR,GAD+B;AAOrCC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,KAAK,EAAE,MADD;AAENC,IAAAA,MAAM,EAAE;AAFF,GAP2B;AAWrCC,EAAAA,IAAI,EAAE;AACFC,IAAAA,KAAK,EAAE;AADL;AAX+B,CAAZ,CAAD,CAA5B;AAgBA;;;;;;;;;;;;;;;;;;;AAkBA,eAAe,SAASC,aAAT,GAAyB;AACpC,QAAMC,OAAO,GAAGb,SAAS,EAAzB;AACA,sBAAS;AACD,IAAA,SAAS,EAAKa,OAAO,CAACX,IADrB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAEL,oBACA,QADA;AACS,IAAA,UAAU,EAAK,GADxB;AAEA,IAAA,SAAS,EAAKW,OAAO,CAACN,QAFtB;AAGA,IAAA,IAAI,EAAK,CAHT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAIIR,QAAQ,CAACe,GAAT,CAAcC,IAAD,iBAAY,oBACrB,YADqB;AACR,IAAA,GAAG,EAAKA,IAAI,CAACC,GADL;AAErB,IAAA,IAAI,EAAKD,IAAI,CAACE,IAAL,IAAa,CAFD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAGrB;AACI,IAAA,GAAG,EAAKF,IAAI,CAACC,GADjB;AAEA,IAAA,GAAG,EAAKD,IAAI,CAACG,KAFb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAHqB,MAAzB,CAJJ,MAFK,MAAT;AAmBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;;;;;;;;;;;;;;;;;;;;;AAqBH","sourcesContent":["import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport GridList from '@material-ui/core/GridList';\nimport GridListTile from '@material-ui/core/GridListTile';\nimport GridListTileBar from '@material-ui/core/GridListTileBar';\nimport ListSubheader from '@material-ui/core/ListSubheader';\nimport IconButton from '@material-ui/core/IconButton';\nimport InfoIcon from '@material-ui/icons/Info';\nimport tileData from './tileData';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-around',\n overflow: 'hidden',\n },\n gridList: {\n width: '100%',\n height: '100%',\n },\n icon: {\n color: 'rgba(255, 255, 255, 0.54)',\n },\n}));\n\n/**\n * The example data is structured as follows:\n *\n * import image from 'path/to/image.jpg';\n * [etc...]\n *\n * const tileData = [\n * {\n * img: image,\n * title: 'Image',\n * author: 'author',\n * cols: 2,\n * },\n * {\n * [etc...]\n * },\n * ];\n */\nexport default function ImageGridList() {\n const classes = useStyles();\n return ( <\n div className = { classes.root } >\n <\n GridList cellHeight = { 140 }\n className = { classes.gridList }\n cols = { 4 } > {\n tileData.map((tile) => ( <\n GridListTile key = { tile.img }\n cols = { tile.cols || 1 } >\n <\n img src = { tile.img }\n alt = { tile.title }\n /> < /\n GridListTile >\n ))\n } <\n /GridList> < /\n div >\n );\n /*\n return ( <\n div className = { classes.root } >\n <\n GridList cellHeight = { 160 }\n className = { classes.gridList } >\n <\n GridListTile key = \"Subheader\"\n cols = { 2 }\n style = {\n { height: 'auto' }\n } >\n <\n ListSubheader component = \"div\" > December < /ListSubheader> < /\n GridListTile > {\n tileData.map((tile) => ( < GridListTile key = { tile.img }\n cols = { tile.cols || 1 } >\n <\n img src = { tile.img }\n alt = { tile.title }\n /> < /\n GridListTile >\n ))\n } <\n /GridList> < /\n div >\n );\n */\n /*\n return ( <\n div className = { classes.root } >\n <\n GridList cellHeight = { 140 }\n className = { classes.gridList }\n cols = { 4 } > {\n tileData.map((tile) => ( <\n GridListTile key = { tile.img }\n cols = { tile.cols || 1 } >\n <\n img src = { tile.img }\n alt = { tile.title }\n /> < /\n GridListTile >\n ))\n } <\n /GridList> < /\n div >\n );\n */\n}"]},"metadata":{},"sourceType":"module"}