Skip to content

Commit 776415f

Browse files
authored
Merge pull request code-dot-org#10315 from code-dot-org/dialogSizing
render dialog size based on window size
2 parents 6fa0ddf + c79a134 commit 776415f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/src/code-studio/components/progress/StageLockDialog.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const styles = {
1515
marginLeft: 20,
1616
marginRight: 20,
1717
color: color.charcoal,
18-
maxHeight: 600,
18+
// maxHeight provided in render method based on window size
1919
overflowY: 'scroll'
2020
},
2121
title: {
@@ -139,12 +139,15 @@ const StageLockDialog = React.createClass({
139139
},
140140

141141
render() {
142+
const responsiveHeight = {
143+
maxHeight: window.innerHeight * 0.8 - 100
144+
};
142145
return (
143146
<BaseDialog
144147
isOpen={this.props.isOpen}
145148
handleClose={this.props.handleClose}
146149
>
147-
<div style={styles.main}>
150+
<div style={[styles.main, responsiveHeight]}>
148151
<div style={styles.title}>{commonMsg.assessmentSteps()}</div>
149152
<table>
150153
<tbody>

0 commit comments

Comments
 (0)