AY 5 éve
szülő
commit
3f7c0e4f94
1 módosított fájl, 22 hozzáadás és 2 törlés
  1. 22 2
      photo/src/ImageList.js

+ 22 - 2
photo/src/ImageList.js

@@ -1,8 +1,10 @@
 import PropTypes from 'prop-types';
 import React from 'react';
-import ReactDOM from 'react-dom';
 import Gallery from 'react-grid-gallery';
 import LinearProgress from '@material-ui/core/LinearProgress';
+import ShareIcon from '@material-ui/icons/Share';
+import Button from '@material-ui/core/Button';
+import { makeStyles } from '@material-ui/core/styles';
 
 class imageList extends React.Component {
     constructor(props) {
@@ -18,6 +20,9 @@ class imageList extends React.Component {
 
     }
 
+
+
+
     componentDidMount() {
         fetch("/backend_test/listFile", {})
         /*
@@ -54,8 +59,13 @@ class imageList extends React.Component {
         this.setState({ path: "user:/Photo/Photo/uploads/" });
     }
 
+    
     render() {
         const { isLoaded, items, error } = this.state;
+        const theme = {
+            margin: 4,
+        }
+
         if (error) {
             return <div>Error: {error.message} (imageList.js)</div>;
         }else if(!isLoaded) {
@@ -63,7 +73,17 @@ class imageList extends React.Component {
         } else {
             return ( < Gallery images = { this.state.images }
                 enableLightbox = { true }
-                enableImageSelection = { false }
+                enableImageSelection={false}
+                
+                customControls={[
+                    <Button
+                        variant="contained"
+                        color="primary"
+                        size="large"
+                        style={theme}
+                        startIcon={<ShareIcon />}
+                    >Share</Button>
+                ]}
                 />
             );
         }