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'; import BunLogo from './bun'; interface InstallProps { npm?: string; yarn?: string; pnpm?: string; bun?: string; } const InstallDependencies: React.FC = (props) => { const { npm, yarn, pnpm, bun } = 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: , }, { key: 'bun', label: 'Bun', children: bun ? {bun} : null, icon: , }, ].filter((item) => item.children); return ( ); }; export default InstallDependencies;