Skip to content

Commit

Permalink
moved over SpiffToolTip
Browse files Browse the repository at this point in the history
  • Loading branch information
jasquat committed Feb 7, 2025
1 parent ed7461c commit 471aa5f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import appVersionInfo from '../../helpers/appVersionInfo';
import { DOCUMENTATION_URL } from '../../config';
import UserService from '../../services/UserService';
import SpiffLogo from './SpiffLogo';
import SpiffTooltip from '../../components/SpiffTooltip';
import SpiffTooltip from './SpiffTooltip';

const drawerWidth = 350;
const collapsedDrawerWidth = 64;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Tooltip } from '@mui/material';
import { ReactElement } from 'react';

interface OwnProps {
title?: string;
placement?: 'top' | 'bottom' | 'left' | 'right';
children: ReactElement;
}

export default function SpiffTooltip({ title, children, placement }: OwnProps) {
return (
<Tooltip
title={title}
arrow
enterDelay={500}
// eslint-disable-next-line react/jsx-props-no-spreading
{...(placement ? { placement } : {})}
PopperProps={{ style: { zIndex: 9999 } }}
>
{children}
</Tooltip>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
FormControlLabel,
} from '@mui/material';
import { ViewModule } from '@mui/icons-material';
import SpiffTooltip from '../../components/SpiffTooltip';
import SpiffTooltip from './SpiffTooltip';

type OwnProps = {
onGroupBySelect?: Function;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from '@mui/material';
import { AccessTime, PlayArrow } from '@mui/icons-material';
import { useNavigate } from 'react-router';
import SpiffTooltip from '../../components/SpiffTooltip';
import SpiffTooltip from './SpiffTooltip';
import { ProcessInstance, ProcessInstanceTask } from '../../interfaces';
import UserService from '../../services/UserService';
import { TimeAgo } from '../../helpers/timeago';
Expand Down

0 comments on commit 471aa5f

Please sign in to comment.