Skip to content

Commit c79a134

Browse files
committed
render dialog size based on window size
1 parent a43df1b commit c79a134

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: {
@@ -134,12 +134,15 @@ const StageLockDialog = React.createClass({
134134
},
135135

136136
render() {
137+
const responsiveHeight = {
138+
maxHeight: window.innerHeight * 0.8 - 100
139+
};
137140
return (
138141
<BaseDialog
139142
isOpen={this.props.isOpen}
140143
handleClose={this.props.handleClose}
141144
>
142-
<div style={styles.main}>
145+
<div style={[styles.main, responsiveHeight]}>
143146
<div style={styles.title}>{commonMsg.assessmentSteps()}</div>
144147
<table>
145148
<tbody>

0 commit comments

Comments
 (0)