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,
|
y: number,
|
||||||
width: number,
|
width: number,
|
||||||
height: number,
|
height: number,
|
||||||
|
style: React.CSSProperties,
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Container extends React.Component<IContainerProps> {
|
export class Container extends React.Component<IContainerProps> {
|
||||||
public render() {
|
public render() {
|
||||||
const properties = {
|
|
||||||
x: this.props.x,
|
|
||||||
y: this.props.y,
|
|
||||||
width: this.props.width,
|
|
||||||
height: this.props.height
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
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> {
|
export class MainContainer extends React.Component<IMainContainerProps> {
|
||||||
public render() {
|
public render() {
|
||||||
|
const style: React.CSSProperties = {
|
||||||
|
fillOpacity: 0,
|
||||||
|
stroke: 'black'
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container
|
<Container
|
||||||
x={0}
|
x={0}
|
||||||
y={0}
|
y={0}
|
||||||
width={this.props.width}
|
width={this.props.width}
|
||||||
height={this.props.height}
|
height={this.props.height}
|
||||||
|
style={style}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ serve({
|
||||||
MainContainer: {
|
MainContainer: {
|
||||||
Type: 'Trou',
|
Type: 'Trou',
|
||||||
BorderColor: '#ffffff',
|
BorderColor: '#ffffff',
|
||||||
Height: 1600,
|
Height: 300,
|
||||||
Width: 20000
|
Width: 2000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue