diff --git a/src/components/manager/membersPage/informationTab/ManagerInformationTabContent.tsx b/src/components/manager/membersPage/informationTab/ManagerInformationTabContent.tsx index b8248c8..cd581bb 100644 --- a/src/components/manager/membersPage/informationTab/ManagerInformationTabContent.tsx +++ b/src/components/manager/membersPage/informationTab/ManagerInformationTabContent.tsx @@ -1,4 +1,11 @@ +import { DetailedToolTipBtn } from '@/sprintFiles/DetailedToolTipBtn/DetailedToolTipBtn' + const ManagerInformationTabContent = () => { - return
ManagerInformationTabContent
+ return ( +
+ ManagerInformationTabContent + +
+ ) } export default ManagerInformationTabContent diff --git a/src/sprintFiles/DetailedToolTipBtn/DetailedToolTipBtn.tsx b/src/sprintFiles/DetailedToolTipBtn/DetailedToolTipBtn.tsx new file mode 100644 index 0000000..c3092c3 --- /dev/null +++ b/src/sprintFiles/DetailedToolTipBtn/DetailedToolTipBtn.tsx @@ -0,0 +1,85 @@ +import * as React from 'react' +import Tooltip, { tooltipClasses } from '@mui/material/Tooltip' +import { + Box, + ClickAwayListener, + IconButton, + Typography, + styled, +} from '@mui/material' +import { TooltipProps } from '@mui/material/Tooltip' +import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined' +import CloseIcon from '@mui/icons-material/Close' + +type DetailedToolTipBtnProps = { + messagePopUp: string + placement?: TooltipProps['placement'] +} + +const HtmlTooltip = styled(({ className, ...props }: TooltipProps) => ( + +))(({ theme }) => ({ + [`& .${tooltipClasses.tooltip}`]: { + backgroundColor: 'black', + color: 'white', + maxWidth: 280, + fontSize: theme.typography.pxToRem(12), + border: '1px solid #dadde9', + }, +})) + +/* General ToolTip function +Displays a button with an information icon. +When clicked, it will display the custom messagePopUp next to the button. +Preferably should contain a message to help user with flow/control navigate. + +Can also input a placement which consists of (no input defaults to "bottom"): +"bottom-end" | "bottom-start" | "bottom" | "left-end" | "left-start" | +"left" | "right-end" | "right-start" | "right" | "top-end" | "top-start" |"top" +*/ +export const DetailedToolTipBtn: React.FC = ({ + messagePopUp, + placement, +}: DetailedToolTipBtnProps) => { + const [open, setOpen] = React.useState(false) + + const handleTooltipClose = () => { + setOpen(false) + } + + const handleTooltipOpen = () => { + setOpen(true) + } + + return ( + +
+ + + {messagePopUp} + + + + + + } + > + + + + +
+
+ ) +}