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