import React, { ComponentProps, memo } from 'react'; import { Separator } from '@storybook/components'; import { ToolBarControl } from './ToolBarControl'; import { ContextNode, FCNoChildren, SelectionState } from '../../shared/types.d'; type ToolBar = FCNoChildren<{ nodes: ContextNode[]; state: SelectionState; setSelected: ComponentProps['setSelected']; }>; export const ToolBar: ToolBar = memo(({ nodes, state, setSelected }) => nodes.length ? ( <> {nodes.map(({ components, ...forwardProps }) => ( ))} ) : null );