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
|
@ -8,7 +8,7 @@ interface ISidebarProps {
|
|||
buttonOnClick: (type: string) => void;
|
||||
}
|
||||
|
||||
export default class Sidebar extends React.Component<ISidebarProps> {
|
||||
export default class Sidebar extends React.PureComponent<ISidebarProps> {
|
||||
public render() {
|
||||
const listElements = this.props.componentOptions.map(componentOption =>
|
||||
<button className='hover:bg-blue-600 transition-all sidebar-row' key={componentOption.Type} onClick={() => this.props.buttonOnClick(componentOption.Type)}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue