import React from 'react'; import { ConfigProvider, Tabs } from 'antd'; import SourceCode from 'dumi/theme-default/builtins/SourceCode'; import type { Tab } from 'rc-tabs/lib/interface'; import NpmLogo from './npm'; import PnpmLogo from './pnpm'; import YarnLogo from './yarn'; interface InstallProps { npm?: string; yarn?: string; pnpm?: string; } const InstallDependencies: React.FC = (props) => { const { npm, yarn, pnpm } = props; const items: Tab[] = [ { key: 'npm', label: 'npm', children: npm ? {npm} : null, icon: , }, { key: 'yarn', label: 'yarn', children: yarn ? {yarn} : null, icon: , }, { key: 'pnpm', label: 'pnpm', children: pnpm ? {pnpm} : null, icon: , }, ].filter((item) => item.children); return ( ); }; export default InstallDependencies;