1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00
unleash.unleash/frontend/src/component/common/HtmlTooltip/HtmlTooltip.tsx

20 lines
702 B
TypeScript
Raw Normal View History

import { styled, Tooltip, tooltipClasses, TooltipProps } from '@mui/material';
const StyledHtmlTooltip = styled(({ className, ...props }: TooltipProps) => (
<Tooltip {...props} classes={{ popper: className }} />
))(({ theme }) => ({
[`& .${tooltipClasses.tooltip}`]: {
display: 'flex',
flexDirection: 'column',
backgroundColor: theme.palette.background.paper,
padding: theme.spacing(1, 1.5),
borderRadius: theme.shape.borderRadius,
boxShadow: theme.shadows[2],
color: theme.palette.text.primary,
},
}));
export const HtmlTooltip = (props: TooltipProps) => (
<StyledHtmlTooltip {...props}>{props.children}</StyledHtmlTooltip>
);