Moved ContainerModel to Interfaces + replace all components to purecomponent (#12)
Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/12
This commit is contained in:
parent
b5aa002877
commit
e3228ccffa
13 changed files with 27 additions and 30 deletions
|
@ -1,7 +1,7 @@
|
|||
import * as React from 'react';
|
||||
import { motion } from 'framer-motion';
|
||||
import { Properties } from '../Properties/Properties';
|
||||
import { IContainerModel, getDepth, MakeIterator } from '../SVG/Elements/ContainerModel';
|
||||
import { IContainerModel, getDepth, MakeIterator } from '../../Interfaces/ContainerModel';
|
||||
|
||||
interface IElementsSidebarProps {
|
||||
MainContainer: IContainerModel | null,
|
||||
|
@ -13,7 +13,7 @@ interface IElementsSidebarProps {
|
|||
selectContainer: (container: IContainerModel) => void
|
||||
}
|
||||
|
||||
export class ElementsSidebar extends React.Component<IElementsSidebarProps> {
|
||||
export class ElementsSidebar extends React.PureComponent<IElementsSidebarProps> {
|
||||
public iterateChilds(handleContainer: (container: IContainerModel) => void): React.ReactNode {
|
||||
if (!this.props.MainContainer) {
|
||||
return null;
|
||||
|
@ -53,7 +53,7 @@ export class ElementsSidebar extends React.Component<IElementsSidebarProps> {
|
|||
duration: 0.150
|
||||
}}
|
||||
className={
|
||||
`w-full elements-sidebar-row whitespace-pre
|
||||
`w-full elements-sidebar-row whitespace-pre
|
||||
text-left text-sm font-medium transition-all ${selectedClass}`
|
||||
}
|
||||
key={key}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue