Delegate MainContainer to App

This commit is contained in:
Siklos 2022-07-31 18:41:34 +02:00
parent 6db63d5a47
commit 70963ce41f
4 changed files with 48 additions and 26 deletions

View file

@ -5,12 +5,13 @@ interface ISidebarProps {
componentOptions: AvailableContainer[]
isOpen: boolean;
onClick: () => void;
buttonOnClick: (type: string) => void;
}
export default class Sidebar extends React.Component<ISidebarProps> {
public render() {
const listElements = this.props.componentOptions.map(componentOption =>
<button className='hover:bg-blue-600 transition-all sidebar-row' key={componentOption.Type}>
<button className='hover:bg-blue-600 transition-all sidebar-row' key={componentOption.Type} onClick={() => this.props.buttonOnClick(componentOption.Type)}>
{componentOption.Type}
</button>
);