Skip to content
This repository was archived by the owner on Aug 1, 2022. It is now read-only.

Commit f0b4b1d

Browse files
tnordbergembiem
authored andcommitted
Add bgcolor prop (#14)
1 parent 93d0909 commit f0b4b1d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export default class extends PureComponent {
4646
brushColor: PropTypes.string,
4747
catenaryColor: PropTypes.string,
4848
gridColor: PropTypes.string,
49+
backgroundColor: PropTypes.string,
4950
hideGrid: PropTypes.bool,
5051
canvasWidth: PropTypes.number,
5152
canvasHeight: PropTypes.number,
@@ -62,6 +63,7 @@ export default class extends PureComponent {
6263
brushColor: "#444",
6364
catenaryColor: "#0a0302",
6465
gridColor: "rgba(150,150,150,0.17)",
66+
backgroundColor: "#FFF",
6567
hideGrid: false,
6668
canvasWidth: 400,
6769
canvasHeight: 400,
@@ -519,7 +521,7 @@ export default class extends PureComponent {
519521
className={this.props.className}
520522
style={{
521523
display: "block",
522-
background: "#fff",
524+
background: this.props.backgroundColor,
523525
touchAction: "none",
524526
width: this.props.canvasWidth,
525527
height: this.props.canvasHeight,

0 commit comments

Comments
 (0)