p5.js-web-editor/client/modules/IDE/components/NewFolderModal.jsx
Cassie Tarakajian e87390adb9 update eslint to latest version, fix lots of linting errors (#308)
* update eslint and dependencies, fix linting errors that can be fixed with --fix

* fix lots of linting errors

* update eslintrc, fix some linting errors

* fix all server side linting errors, untested

* fix errors that fixing linting errors had caused

* fix client side eslint errors

* fix client side linting errors

* fix refs lint errors

* fix more linting errors

* update eslint and dependencies, fix linting errors that can be fixed with --fix

* fix lots of linting errors

* update eslintrc, fix some linting errors

* fix all server side linting errors, untested

* fix errors that fixing linting errors had caused

* fix client side eslint errors

* fix client side linting errors

* fix refs lint errors

* fix more linting errors

* fix some accessibility linting errors

* fix a lot of linting errors

* fix a billion more linting errors

* hopefully fix all linting errors, still need to test

* fix bugs that fixing linting had caused
2017-02-22 14:29:35 -05:00

38 lines
1 KiB
JavaScript

import React, { PropTypes } from 'react';
import { reduxForm } from 'redux-form';
import InlineSVG from 'react-inlinesvg';
import NewFolderForm from './NewFolderForm';
const exitUrl = require('../../../images/exit.svg');
class NewFolderModal extends React.Component {
componentDidMount() {
this.newFolderModal.focus();
}
render() {
return (
<section className="modal" ref={(element) => { this.newFolderModal = element; }} tabIndex="0">
<div className="modal-content-folder">
<div className="modal__header">
<h2 className="modal__title">Add Folder</h2>
<button className="modal__exit-button" onClick={this.props.closeModal}>
<InlineSVG src={exitUrl} alt="Close New Folder Modal" />
</button>
</div>
<NewFolderForm {...this.props} />
</div>
</section>
);
}
}
NewFolderModal.propTypes = {
closeModal: PropTypes.func.isRequired
};
export default reduxForm({
form: 'new-folder',
fields: ['name']
})(NewFolderModal);