Fix tooltips (#8763)
This commit is contained in:
parent
2e6dea3b45
commit
1475bb412d
@ -67,7 +67,7 @@ function Badge ({ className = '', color = 'normal', hover, hoverAction, icon, in
|
||||
{hover && (
|
||||
<Tooltip
|
||||
className='accounts-badge'
|
||||
clickable={!!hoverAction}
|
||||
isClickable={!!hoverAction}
|
||||
text={hoverContent}
|
||||
trigger={trigger}
|
||||
/>
|
||||
|
||||
@ -15,13 +15,13 @@ function rootElement () {
|
||||
interface Props {
|
||||
children?: React.ReactNode;
|
||||
className?: string;
|
||||
isCickable?: boolean;
|
||||
isClickable?: boolean;
|
||||
place?: 'bottom' | 'top' | 'right' | 'left';
|
||||
text?: React.ReactNode;
|
||||
trigger: string;
|
||||
}
|
||||
|
||||
function Tooltip ({ children, className = '', isCickable = false, place, text, trigger }: Props): React.ReactElement<Props> | null {
|
||||
function Tooltip ({ children, className = '', isClickable = false, place, text, trigger }: Props): React.ReactElement<Props> | null {
|
||||
const [tooltipContainer] = useState(
|
||||
typeof document === 'undefined'
|
||||
? {} as HTMLElement // This hack is required for server side rendering
|
||||
@ -41,7 +41,7 @@ function Tooltip ({ children, className = '', isCickable = false, place, text, t
|
||||
return createPortal(
|
||||
<ReactTooltip
|
||||
className={`ui--Tooltip ${className}`}
|
||||
clickable={isCickable}
|
||||
clickable={isClickable}
|
||||
effect='solid'
|
||||
id={trigger}
|
||||
place={place}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user