Delegate MainContainer to App
This commit is contained in:
parent
6db63d5a47
commit
70963ce41f
4 changed files with 48 additions and 26 deletions
|
@ -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>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue