Remove MainContainer as it is the same as Container
This commit is contained in:
parent
2a445cfdc2
commit
63d72b883b
4 changed files with 32 additions and 40 deletions
|
@ -1,30 +0,0 @@
|
|||
import * as React from 'react';
|
||||
import { Container } from './Container';
|
||||
|
||||
interface IMainContainerProps {
|
||||
children: Container[],
|
||||
width: number,
|
||||
height: number,
|
||||
}
|
||||
|
||||
export class MainContainer extends React.Component<IMainContainerProps> {
|
||||
public render() {
|
||||
const style: React.CSSProperties = {
|
||||
fillOpacity: 0,
|
||||
stroke: 'black'
|
||||
};
|
||||
|
||||
return (
|
||||
<Container
|
||||
id={'main'}
|
||||
x={0}
|
||||
y={0}
|
||||
width={this.props.width}
|
||||
height={this.props.height}
|
||||
style={style}
|
||||
>
|
||||
{ this.props.children }
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
import * as React from 'react';
|
||||
import { MainContainer } from './Elements/MainContainer';
|
||||
import { ReactSVGPanZoom, Tool, Value, TOOL_PAN } from 'react-svg-pan-zoom';
|
||||
import { Container } from './Elements/Container';
|
||||
|
||||
interface ISVGProps {
|
||||
children: MainContainer | MainContainer[] | null,
|
||||
children: Container | Container[] | null,
|
||||
}
|
||||
|
||||
interface ISVGState {
|
||||
|
|
|
@ -1,11 +1,23 @@
|
|||
import * as React from 'react';
|
||||
import { Container } from '../SVG/Elements/Container';
|
||||
|
||||
interface ISVGSidebarProps {
|
||||
isOpen: boolean;
|
||||
onClick: () => void;
|
||||
MainContainer: Container | null,
|
||||
isOpen: boolean,
|
||||
onClick: () => void
|
||||
}
|
||||
|
||||
export class SVGSidebar extends React.Component<ISVGSidebarProps> {
|
||||
public iterateChilds(handleContainer: () => void): React.ReactNode {
|
||||
if (!this.props.MainContainer) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (this.props.MainContainer) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public render() {
|
||||
const isOpenClasses = this.props.isOpen ? 'right-0' : '-right-64';
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue