Skip to content

Commit a1dba53

Browse files
committed
fix(csp): add height prop to withMapControl widget (#2138)
1 parent 04d1e05 commit a1dba53

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/netlify-cms-widget-map/src/withMapControl.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ export default function withMapControl({ getFormat, getMap } = {}) {
3333
static propTypes = {
3434
onChange: PropTypes.func.isRequired,
3535
field: PropTypes.object.isRequired,
36+
height: PropTypes.string,
3637
value: PropTypes.node,
3738
};
3839

3940
static defaultProps = {
4041
value: '',
42+
height: '400px'
4143
};
4244

4345
constructor(props) {
@@ -70,6 +72,8 @@ export default function withMapControl({ getFormat, getMap } = {}) {
7072
}
7173

7274
render() {
75+
const { height } = this.props;
76+
7377
return (
7478
<ClassNames>
7579
{({ cx, css }) => (
@@ -80,6 +84,7 @@ export default function withMapControl({ getFormat, getMap } = {}) {
8084
${olStyles};
8185
padding: 0;
8286
overflow: hidden;
87+
height: ${height};
8388
`,
8489
)}
8590
ref={this.mapContainer}

0 commit comments

Comments
 (0)