Add style to Main Container
This commit is contained in:
parent
ed5d2daed8
commit
58ec891db3
3 changed files with 16 additions and 10 deletions
|
@ -5,19 +5,19 @@ interface IContainerProps {
|
|||
y: number,
|
||||
width: number,
|
||||
height: number,
|
||||
style: React.CSSProperties,
|
||||
}
|
||||
|
||||
export class Container extends React.Component<IContainerProps> {
|
||||
public render() {
|
||||
const properties = {
|
||||
x: this.props.x,
|
||||
y: this.props.y,
|
||||
width: this.props.width,
|
||||
height: this.props.height
|
||||
};
|
||||
|
||||
return (
|
||||
<rect {...properties} />
|
||||
<rect
|
||||
x={this.props.x}
|
||||
y={this.props.y}
|
||||
width={this.props.width}
|
||||
height={this.props.height}
|
||||
style={this.props.style}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,12 +8,18 @@ interface IMainContainerProps {
|
|||
|
||||
export class MainContainer extends React.Component<IMainContainerProps> {
|
||||
public render() {
|
||||
const style: React.CSSProperties = {
|
||||
fillOpacity: 0,
|
||||
stroke: 'black'
|
||||
};
|
||||
|
||||
return (
|
||||
<Container
|
||||
x={0}
|
||||
y={0}
|
||||
width={this.props.width}
|
||||
height={this.props.height}
|
||||
style={style}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ serve({
|
|||
MainContainer: {
|
||||
Type: 'Trou',
|
||||
BorderColor: '#ffffff',
|
||||
Height: 1600,
|
||||
Width: 20000
|
||||
Height: 300,
|
||||
Width: 2000
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue