Feat : Introduced Delay Options for Tooltip (#5766)

Fixes https://github.com/twentyhq/twenty/issues/5727

---------

Co-authored-by: Rushikesh Tarapure <rushikeshtarapure@gofynd.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Rushikesh Tarapure
2024-06-19 20:07:44 +05:30
committed by GitHub
parent 86f95c0870
commit bc8c895b0e
8 changed files with 98 additions and 88 deletions

View File

@ -1,9 +1,8 @@
import { ChangeEvent, ReactNode, useRef } from 'react';
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
import { Tooltip } from 'react-tooltip';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { Avatar, AvatarType } from 'twenty-ui';
import { AppTooltip, Avatar, AvatarType } from 'twenty-ui';
import { v4 as uuidV4 } from 'uuid';
import {
@ -55,17 +54,6 @@ const StyledTitle = styled.div`
justify-content: center;
`;
const StyledTooltip = styled(Tooltip)`
background-color: ${({ theme }) => theme.background.primary};
box-shadow: ${({ theme }) => theme.boxShadow.light};
color: ${({ theme }) => theme.font.color.primary};
font-size: ${({ theme }) => theme.font.size.sm};
font-weight: ${({ theme }) => theme.font.weight.regular};
padding: ${({ theme }) => theme.spacing(2)};
`;
const StyledAvatarWrapper = styled.div`
cursor: pointer;
`;
@ -153,7 +141,7 @@ export const ShowPageSummaryCard = ({
Added {beautifiedCreatedAt}
</StyledDate>
)}
<StyledTooltip
<AppTooltip
anchorSelect={`#${dateElementId}`}
content={exactCreatedAt}
clickable