-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* readd work on new branch Signed-off-by: sharpd <number6labs@gmail.com> * remove comments as per feedback. Signed-off-by: sharpd <number6labs@gmail.com> --------- Signed-off-by: sharpd <number6labs@gmail.com> Co-authored-by: sharpd <number6labs@gmail.com>
- Loading branch information
1 parent
6f75fc6
commit e48ac69
Showing
2 changed files
with
113 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright 2018-2023 contributors to the Marquez project | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { createTheme } from '@mui/material/styles' | ||
import { useTheme } from '@emotion/react' | ||
import React, { ReactElement } from 'react' | ||
import Tooltip from '@mui/material/Tooltip' | ||
|
||
interface MqToolTipProps { | ||
title: string | ReactElement | ||
children: ReactElement | ||
} | ||
|
||
const MQTooltip: React.FC<MqToolTipProps> = ({ title, children }) => { | ||
const theme = createTheme(useTheme()) | ||
return ( | ||
<Tooltip | ||
title={title} | ||
componentsProps={{ | ||
tooltip: { | ||
sx: { | ||
backgroundColor: theme.palette.background.default, | ||
color: theme.palette.common.white, | ||
border: `1px solid ${theme.palette.common.white}`, | ||
maxWidth: '600px', | ||
fontSize: 14, | ||
}, | ||
}, | ||
}} | ||
> | ||
{children} | ||
</Tooltip> | ||
) | ||
} | ||
|
||
export default MQTooltip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters