diff --git a/packages/react-components/src/Tooltip.tsx b/packages/react-components/src/Tooltip.tsx index 10871ebeaa..0eab068c86 100644 --- a/packages/react-components/src/Tooltip.tsx +++ b/packages/react-components/src/Tooltip.tsx @@ -7,8 +7,6 @@ import ReactDOM from 'react-dom'; import ReactTooltip from 'react-tooltip'; import styled from 'styled-components'; -import { classes } from './util'; - const rootElement = typeof document === 'undefined' ? null // This hack is required for server side rendering : document.getElementById('tooltips'); @@ -45,7 +43,7 @@ function Tooltip ({ className = '', effect = 'solid', offset, place = 'top', tex return ReactDOM.createPortal( | BN | string, currency: string, withSi?: b return <>{`${prefix}${isShort ? '' : '.'}`}{!isShort && (<>{`000${postfix || ''}`.slice(-3)})} {`${currency}${labelPost || ''}`}; } -function FormatBalance ({ className = '', isShort, label, labelPost, value, withSi }: Props): React.ReactElement { +function FormatBalance ({ children, className = '', isShort, label, labelPost, value, withSi }: Props): React.ReactElement { const { t } = useTranslation(); const [currency] = useState(formatBalance.getDefaults().unit); @@ -48,7 +49,7 @@ function FormatBalance ({ className = '', isShort, label, labelPost, value, with ? t('everything{{labelPost}}', { replace: { labelPost } }) : format(value, currency, withSi, isShort, labelPost) : `-${labelPost || ''}` - } + }{children} ); }