import React from 'react'; import Tabs from '../Tabs/Tabs'; import { makeClassNameHelper, wrappable } from '../../Utils/ComponentUtils'; import './ResultTabs.scss'; import { ResultType } from '../../Utils/WdkResult'; const cx = makeClassNameHelper('wdk-Tab'); export type TabConfig = { key: TabKey; display: React.ReactNode; removable?: boolean; tooltip?: string; content: React.ReactNode; }; type Props = { // include resultType for consumers wrapping component resultType: ResultType; tabs: TabConfig[]; activeTab: string; onTabSelected: (tab: TabKey) => void; onTabRemoved?: (tab: TabKey) => void; headerContent?: React.ReactNode; containerClassName?: string; loadingTabs: boolean; }; export default wrappable(function ResultTabs({ tabs, ...rest }: Props) { return ({ ...otherOptions, display: {display} }) )} {...rest} />; });