import React from 'react'; import { Icon, Typography, Popover } from 'antd'; import styles from './index.less'; const firstUpperCase = (pathString: string) => { return pathString .replace('.', '') .split(/\/|\-/) .map(s => s.toLowerCase().replace(/( |^)[a-z]/g, L => L.toUpperCase())) .filter(s => s) .join(''); }; const BlockCodeView: React.SFC<{ url: string; }> = ({ url }) => { const blockUrl = `npx umi block add ant-design-pro/${firstUpperCase(url)} --path=${url}`; return (
{blockUrl}
); }; export default ({ url }: { url: string }) => { return ( } trigger="click" >
); };