mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-04 11:54:10 +00:00 
			
		
		
		
	Created EditPage container
This commit is contained in:
		
							parent
							
								
									1ee852c485
								
							
						
					
					
						commit
						ea2a9237be
					
				@ -17,6 +17,11 @@ import styles from './styles.scss';
 | 
				
			|||||||
class PluginInputFile extends React.PureComponent {
 | 
					class PluginInputFile extends React.PureComponent {
 | 
				
			||||||
  state = { isDraging: false };
 | 
					  state = { isDraging: false };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  handleChange = (e) => {
 | 
				
			||||||
 | 
					    const dataTransfer = e.target;
 | 
				
			||||||
 | 
					    this.props.onDrop({ dataTransfer });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  handleDragEnter = () => this.setState({ isDraging: true });
 | 
					  handleDragEnter = () => this.setState({ isDraging: true });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  handleDragLeave = () => this.setState({ isDraging: false });
 | 
					  handleDragLeave = () => this.setState({ isDraging: false });
 | 
				
			||||||
@ -30,7 +35,6 @@ class PluginInputFile extends React.PureComponent {
 | 
				
			|||||||
  render() {
 | 
					  render() {
 | 
				
			||||||
    const {
 | 
					    const {
 | 
				
			||||||
      name,
 | 
					      name,
 | 
				
			||||||
      onChange,
 | 
					 | 
				
			||||||
      showLoader,
 | 
					      showLoader,
 | 
				
			||||||
    } = this.props;
 | 
					    } = this.props;
 | 
				
			||||||
    const { isDraging } = this.state;
 | 
					    const { isDraging } = this.state;
 | 
				
			||||||
@ -62,7 +66,7 @@ class PluginInputFile extends React.PureComponent {
 | 
				
			|||||||
        <input
 | 
					        <input
 | 
				
			||||||
          multiple
 | 
					          multiple
 | 
				
			||||||
          name={name}
 | 
					          name={name}
 | 
				
			||||||
          onChange={onChange}
 | 
					          onChange={this.handleChange}
 | 
				
			||||||
          type="file"
 | 
					          type="file"
 | 
				
			||||||
        />
 | 
					        />
 | 
				
			||||||
      </label>
 | 
					      </label>
 | 
				
			||||||
@ -70,13 +74,10 @@ class PluginInputFile extends React.PureComponent {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PluginInputFile.defaultProps = {
 | 
					PluginInputFile.defaultProps = {};
 | 
				
			||||||
  onChange: () => {},
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
PluginInputFile.propTypes = {
 | 
					PluginInputFile.propTypes = {
 | 
				
			||||||
  name: PropTypes.string.isRequired,
 | 
					  name: PropTypes.string.isRequired,
 | 
				
			||||||
  onChange: PropTypes.func,
 | 
					 | 
				
			||||||
  onDrop: PropTypes.func.isRequired,
 | 
					  onDrop: PropTypes.func.isRequired,
 | 
				
			||||||
  showLoader: PropTypes.bool.isRequired,
 | 
					  showLoader: PropTypes.bool.isRequired,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user