react-modal-dialog
react-modal-dialog copied to clipboard
Set the width and height of the dialog in percentages
Hi, Is it possible to set the width and height of the dialog to a certain percentage of the screen width? This the output when I try to do it.
<ModalContainer onClose={this.handleClose}>
{
this.state.isLoading ?
<ReactSpinner/> :
<ModalDialog style={{height: '50%',width: '70%'}} onClose={this.handleClose}>
<BookItem {...this.state.book}/>
</ModalDialog>
}
</ModalContainer>
I'd like to make the content fit within the reduced dialog. Is there any way to do it in the current version of react-modal-dialog? Also, this is the output if the content is large and I don't set any width and height for dialog:
Width works but not sure about height. I usually just let the content stretch the height out.
I'd be happy to take any pull requests that make this better though.