Skip to content

Commit bba21a6

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

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/netlify-cms-proxy-server/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
entry: { index: path.join('src', 'index.ts'), middlewares: path.join('src', 'middlewares.ts') },
1111
mode: NODE_ENV,
1212
target: 'node',
13-
devtool: 'cheap-module-source-map',
13+
devtool: 'source-map',
1414
output: {
1515
path: path.resolve(__dirname, 'dist'),
1616
filename: '[name].js',

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)