fix(layout): implement blockDefaultProps in layout

This commit is contained in:
Gervwyk 2020-10-30 13:22:39 +02:00
parent a128de6810
commit b1fe2b9f41
2 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,7 @@
import React from 'react'; import React from 'react';
import { Row } from 'antd'; import { Row } from 'antd';
import gutterSetup from './gutterSetup.js'; import gutterSetup from './gutterSetup.js';
import { blockDefaultProps } from '@lowdefy/block-tools';
const Area = ({ area, areaStyle, children, highlightBorders, id, makeCssClass }) => ( const Area = ({ area, areaStyle, children, highlightBorders, id, makeCssClass }) => (
<Row <Row
@ -37,4 +38,6 @@ const Area = ({ area, areaStyle, children, highlightBorders, id, makeCssClass })
</Row> </Row>
); );
Area.defaultProps = blockDefaultProps;
export default Area; export default Area;

View File

@ -17,6 +17,7 @@
import React from 'react'; import React from 'react';
import { Col } from 'antd'; import { Col } from 'antd';
import deriveLayout from './deriveLayout.js'; import deriveLayout from './deriveLayout.js';
import { blockDefaultProps } from '@lowdefy/block-tools';
const alignSelf = (align) => { const alignSelf = (align) => {
if (align === 'bottom') { if (align === 'bottom') {
@ -54,4 +55,6 @@ const BlockLayout = ({ id, blockStyle, children, highlightBorders, layout, makeC
); );
}; };
BlockLayout.defaultProps = blockDefaultProps;
export default BlockLayout; export default BlockLayout;