From 3117288b7bf6ad7594cc734a658903631459ce74 Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 20 May 2021 10:33:22 +0200 Subject: [PATCH] chore: fix formatting and use tooltip instead Signed-off-by: blam --- .../components/TemplateCard/TemplateCard.tsx | 47 +++++-------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/plugins/scaffolder/src/components/TemplateCard/TemplateCard.tsx b/plugins/scaffolder/src/components/TemplateCard/TemplateCard.tsx index 18b7679000..7bdaa0a671 100644 --- a/plugins/scaffolder/src/components/TemplateCard/TemplateCard.tsx +++ b/plugins/scaffolder/src/components/TemplateCard/TemplateCard.tsx @@ -24,7 +24,7 @@ import { Chip, Link, makeStyles, - Popover, + Tooltip, Typography, useTheme, } from '@material-ui/core'; @@ -58,6 +58,9 @@ const useDeprecationStyles = makeStyles(theme => ({ right: theme.spacing(3.5), padding: '0.25rem', }, + link: { + color: theme.palette.warning.light, + }, })); export type TemplateCardProps = { @@ -87,48 +90,24 @@ const getTemplateCardProps = ( }; const DeprecationWarning = () => { - const [anchorEl, setAnchorEl] = React.useState(null); - - const handleClick = (event: React.MouseEvent) => { - setAnchorEl(event.currentTarget); - }; - const styles = useDeprecationStyles(); - const handleClose = () => { - setAnchorEl(null); - }; - - const open = Boolean(anchorEl); - const Title = ( - This template syntax is deprecated. -
- - Please follow the documentation to migrate - + This template syntax is deprecated. Click for more info.
); return (
- - - {Title} - + + + + +
); };