Implement container adding
This commit is contained in:
parent
70963ce41f
commit
6c029ac13c
2 changed files with 32 additions and 10 deletions
|
@ -11,12 +11,18 @@ interface IContainerProps {
|
|||
}
|
||||
|
||||
export class Container extends React.Component<IContainerProps> {
|
||||
public render(): React.ReactNode {
|
||||
const containersElements = this.props.children.map(child => child.render());
|
||||
public static ContainerCount = 0;
|
||||
|
||||
componentWillUnMount() {
|
||||
}
|
||||
|
||||
public render(): React.ReactNode {
|
||||
Container.ContainerCount++;
|
||||
const containersElements = this.props.children.map(child => child.render());
|
||||
return (
|
||||
<g
|
||||
transform={`translate(${this.props.x}, ${this.props.y})`}
|
||||
key={`container-${Container.ContainerCount}`}
|
||||
>
|
||||
<rect
|
||||
width={this.props.width}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue