Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import { withStyles } from 'material-ui/styles';
  4. import { LinearProgress } from 'material-ui/Progress';
  5.  
  6. const styles = {
  7.     root: {
  8.         flexGrow: 1,
  9.         width: "100%",
  10.         position: "fixed",
  11.         zIndex: "999",
  12.     },
  13. };
  14.  
  15. class LinearIndeterminate extends  React.Component{
  16.     constructor() {
  17.         super();
  18.         this.state = {
  19.             showForm: false
  20.         }
  21.     }
  22.     render() {
  23.         const {classes} = this.props;
  24.         const showHide = {
  25.             'display': this.state.showForm ? 'block' : 'none'
  26.         };
  27.  
  28.         const showReplyForm = () => {
  29.             this.setState({showForm: true});
  30.         };
  31.         return (
  32.             <div className={classes.root} style={showHide}>
  33.                 <LinearProgress color="secondary"/>
  34.             </div>
  35.         );
  36.     }
  37. }
  38.  
  39. LinearIndeterminate.propTypes = {
  40.     classes: PropTypes.object.isRequired,
  41. };
  42.  
  43. export default withStyles(styles)(LinearIndeterminate);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement