forked from xhonia/hooglehocs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
87 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,83 @@ | ||
var React = require('react'); | ||
var classNames = require('classnames'); | ||
import ReactDOM from 'react-dom'; | ||
|
||
const Docs= ({})=>{ | ||
return( | ||
|
||
) | ||
class Docs extends React.Component { | ||
constructor(){ | ||
super(); | ||
this.state={ | ||
modalOpen1: false, | ||
modalOpen2: false | ||
} | ||
} | ||
modal1Toggle(e){ | ||
e.preventDefault(); | ||
this.setState({ | ||
modalOpen1: !this.state.modalOpen1 | ||
}) | ||
} | ||
modal2Toggle(e){ | ||
e.preventDefault(); | ||
this.setState({ | ||
modalOpen2: !this.state.modalOpen2 | ||
}) | ||
} | ||
createDoc(e){ | ||
|
||
} | ||
render(){ | ||
var modalClass1 = classNames({ | ||
'modal': true, | ||
'is-active': this.state.modalOpen1 | ||
}); | ||
var modalClass2 = classNames({ | ||
'modal': true, | ||
'is-active': this.state.modalOpen2 | ||
}); | ||
return( | ||
<div> | ||
<h1>Document Portal</h1> | ||
<div> | ||
<button className='is-button' onClick={(e)=>this.modal1Toggle(e)}>New Document | ||
</button> | ||
<div className={modalClass1}> | ||
<div className="modal-background" onClick={(e)=>this.modal1Toggle(e)}></div> | ||
<div className="modal-content"> | ||
<div className='box'>Doc Name input | ||
<input type='text' /> | ||
<input type="submit" value="Create" onClick={(e)=>{ | ||
this.modal1Toggle(e) | ||
this.createDoc(e) }}/> | ||
</div> | ||
</div> | ||
<button className="modal-close is-large" onClick={(e)=>this.modal1Toggle(e)}></button> | ||
</div> | ||
</div> | ||
<div> | ||
<button className='is-button' onClick={(e)=>this.modal2Toggle(e)}>Add Shared Document | ||
</button> | ||
<div className={modalClass2}> | ||
<div className="modal-background" onClick={(e)=>this.modal2Toggle(e)}></div> | ||
<div className="modal-content"> | ||
<div className="box">Doc Collab input | ||
<input type='text'/> | ||
<input type="submit" value="Create" onClick={(e)=>this.modal2Toggle(e)}/> | ||
</div> | ||
</div> | ||
<button className="modal-close is-large" onClick={(e)=>this.modal2Toggle(e)}></button> | ||
</div> | ||
</div> | ||
<div> | ||
Doc List | ||
</div> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default 'Docs'; | ||
ReactDOM.render( | ||
<Docs/>, | ||
document.getElementById('root') | ||
); | ||
|
||
// export default Docs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters