Implement MainContainer
This commit is contained in:
parent
adf86ebea1
commit
40fae7dde3
4 changed files with 88 additions and 6 deletions
33
src/SVG/SVG.tsx
Normal file
33
src/SVG/SVG.tsx
Normal file
|
@ -0,0 +1,33 @@
|
|||
import * as React from 'react';
|
||||
import { IAvailableContainerModel } from '../Interfaces/IAvailableContainerModel';
|
||||
import { MainContainer } from './Elements/MainContainer';
|
||||
|
||||
interface ISVGProps {
|
||||
MainContainer: IAvailableContainerModel
|
||||
}
|
||||
|
||||
export class SVG extends React.Component<ISVGProps> {
|
||||
render() {
|
||||
const viewBox: string = [
|
||||
0,
|
||||
0,
|
||||
window.innerWidth,
|
||||
window.innerHeight
|
||||
].join(' ');
|
||||
const xmlns = '<http://www.w3.org/2000/svg>';
|
||||
|
||||
const properties = {
|
||||
viewBox,
|
||||
xmlns
|
||||
};
|
||||
|
||||
return (
|
||||
<svg {...properties}>
|
||||
<MainContainer
|
||||
width={this.props.MainContainer.Width}
|
||||
height={this.props.MainContainer.Height}
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue