import React, { ReactElement } from 'react'; import { Tooltip as MUITooltip, TooltipComponentsPropsOverrides, TooltipProps } from '@mui/material'; type ValueType = T[keyof T]; type Props = { text: string; id: string; placement?: ValueType>; tooltipSx?: TooltipComponentsPropsOverrides; children: React.ReactNode; }; export const Tooltip = ({ text, id, placement, tooltipSx, children }: Props) => ( t.palette.nym.networkExplorer.tooltip.background, color: (t) => t.palette.nym.networkExplorer.tooltip.color, '& .MuiTooltip-arrow': { color: (t) => t.palette.nym.networkExplorer.tooltip.background, }, }, ...tooltipSx, }, }} arrow > {children as ReactElement} );