Skip to content

Commit

Permalink
Fix size of help panel
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandojsg committed Feb 9, 2017
1 parent 4a442d0 commit 64a3127
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/components/modals/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var React = require('react');

export default class Modal extends React.Component {
static propTypes = {
id: React.PropTypes.string,
children: React.PropTypes.oneOfType([
React.PropTypes.array,
React.PropTypes.element
Expand Down Expand Up @@ -76,7 +77,7 @@ export default class Modal extends React.Component {

render () {
return (
<div className={this.state.isOpen ? 'modal' : 'modal hide'}>
<div id={this.props.id} className={this.state.isOpen ? 'modal' : 'modal hide'}>
<div className='modal-content' ref='self'>
<div className='modal-header'>
<span className='close' onClick={this.close}>×</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/ModalTextures.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export default class ModalTextures extends React.Component {
let addNewAssetButton = this.state.addNewDialogOpened ? 'BACK' : 'LOAD TEXTURE';

return (
<Modal title="Textures" isOpen={isOpen} onClose={this.onClose} closeOnClickOutside={false}>
<Modal id="texture-modal" title="Textures" isOpen={isOpen} onClose={this.onClose} closeOnClickOutside={false}>
<button onClick={this.toggleNewDialog}>{addNewAssetButton}</button>
<div className={this.state.addNewDialogOpened ? '' : 'hide'}>
<div className="newimage">
Expand Down
8 changes: 6 additions & 2 deletions src/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -448,17 +448,21 @@ a.button:hover {
margin: 0.6em 0;
}


#texture-modal .modal-content {
height: calc(100% - 50px);
width: calc(100% - 50px);
}

.modal-content {
animation: animatetop 0.2s ease-out;
animation-duration: 0.2s;
animation-name: animatetop;
background-color: #232323;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.5), 0 6px 20px 0 rgba(0, 0, 0, 0.5);
height: calc(100% - 50px);
margin: auto;
overflow: hidden;
padding: 0;
width: calc(100% - 50px);
}

@keyframes animateopacity {
Expand Down

0 comments on commit 64a3127

Please sign in to comment.