Fix tooltips (#8763)

This commit is contained in:
Jaco 2023-01-11 15:32:37 +02:00 committed by GitHub
parent 2e6dea3b45
commit 1475bb412d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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}
/>

View File

@ -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}