Rename SVGSidebar to ElementsSidebar

This commit is contained in:
Siklos 2022-08-01 11:45:02 +02:00
parent 106c403125
commit e5012256de
2 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
import React from 'react';
import './App.scss';
import Sidebar from './Components/Sidebar/Sidebar';
import { SVGSidebar } from './Components/SVGSidebar/SVGSidebar';
import { ElementsSidebar } from './Components/ElementsSidebar/ElementsSidebar';
import { AvailableContainer } from './Interfaces/AvailableContainer';
import { Configuration } from './Interfaces/Configuration';
import { Container } from './Components/SVG/Elements/Container';
@ -133,7 +133,7 @@ class App extends React.Component<IAppProps> {
buttonOnClick={(type: string) => this.AddContainer(type)}
/>
<button className='fixed z-10 top-4 left-4 text-lg bg-blue-200 hover:bg-blue-300 transition-all drop-shadow-md hover:drop-shadow-lg py-2 px-3 rounded-lg' onClick={() => this.ToggleSidebar()}>&#9776; Menu</button>
<SVGSidebar
<ElementsSidebar
MainContainer={this.state.MainContainer}
SelectedContainer={this.state.SelectedContainer}
isOpen={this.state.isSVGSidebarOpen}

View file

@ -1,7 +1,7 @@
import * as React from 'react';
import { Container } from '../SVG/Elements/Container';
interface ISVGSidebarProps {
interface IElementsSidebarProps {
MainContainer: Container | null,
isOpen: boolean,
SelectedContainer: Container | null,
@ -9,7 +9,7 @@ interface ISVGSidebarProps {
selectContainer: (container: Container) => void
}
export class SVGSidebar extends React.Component<ISVGSidebarProps> {
export class ElementsSidebar extends React.Component<IElementsSidebarProps> {
public iterateChilds(handleContainer: (container: Container, depth: number) => void): React.ReactNode {
// TODO: fix this by using dfs or sort
const root = this.props.MainContainer;