Merge pull request #16848 from Bouncey/fix/jsWarning

fix(styles): Overlay js warning to preserve preview pane height
This commit is contained in:
Berkeley Martinez
2018-03-07 15:16:10 -08:00
committed by GitHub
2 changed files with 16 additions and 6 deletions

View File

@ -26,12 +26,14 @@ export class Preview extends PureComponent {
<div className={ `${ns}-preview` }> <div className={ `${ns}-preview` }>
{ {
!isJSEnabled && ( !isJSEnabled && (
<Alert <div className='js-alert-wrapper'>
bsStyle='info' <Alert
className={ `${ns}-preview-js-warning`} bsStyle='info'
> className={ `${ns}-preview-js-warning` }
JavaScript is disabled. Execute code to enable >
</Alert> JavaScript is disabled. Execute code to enable
</Alert>
</div>
) )
} }
<iframe <iframe

View File

@ -228,6 +228,14 @@
.max-element-height(); .max-element-height();
width: 100%; width: 100%;
overflow-y: hidden; overflow-y: hidden;
.js-alert-wrapper {
.max-element-height();
z-index: 5;
position: fixed;
width: 100%
}
} }
.@{ns}-preview-frame { .@{ns}-preview-frame {