import { Box, Tooltip, TooltipProps } from '@wix/design-system'; import React, { ReactElement } from 'react'; export interface DisabledProps { dataHook?: string; disabled?: boolean; } export interface DisabledTooltipProps
extends TooltipProps { children: ReactElement
; width?: string | number; } export function DisabledTooltip
( props: DisabledTooltipProps
,
) {
const { children, width, ...rest } = props;
const {
props: { disabled },
} = children;
let child = children;
if (disabled) {
child = (