import * as React from 'react'; import CopyToClipboard from 'react-copy-to-clipboard'; import { Icon as AntdIcon, Badge } from 'antd'; import { ThemeType, IconProps } from 'antd/lib/icon'; import classNames from 'classnames'; const Icon: React.SFC = AntdIcon; export interface CopyableIconProps { type: string; theme: ThemeType; isNew: boolean; justCopied: string | null; onCopied: (type: string, text: string) => any; } const CopyableIcon: React.SFC = ({ type, theme, isNew, justCopied, onCopied, }) => { const className = classNames({ copied: justCopied === type, outlined: theme === 'twoTone', }); return ( ` : `` } onCopy={(text: string) => onCopied(type, text)} >
  • {type}
  • ); }; export default CopyableIcon;