Support styles with default style done

This commit is contained in:
2018-07-02 10:41:33 +05:30
parent 2bb7d97ba9
commit 262f659c6f
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -63,15 +63,20 @@ class GridArea extends PureComponent<GridAreaProps, {}> {
static requiresSVG = true;
static defaultStyle = {
fill: 'rgba(0,0,0,0.25)'
}
render() {
const {
innerWidth: width,
innerHeight: height,
marginTop: top,
marginLeft: left,
style
} = this.props;
const style = {...GridArea.defaultStyle, ...this.props.style};
const isVertical = (this.props.direction === Direction.VERTICAL);
const tickXAttr = isVertical ? 'y' : 'x';
const tickYAttr = isVertical ? 'x' : 'y';