File tree 1 file changed +10
-19
lines changed
site/src/components/InfoTooltip 1 file changed +10
-19
lines changed Original file line number Diff line number Diff line change 5
5
HelpTooltipTitle ,
6
6
} from "components/HelpTooltip/HelpTooltip" ;
7
7
import InfoIcon from "@mui/icons-material/InfoOutlined" ;
8
- import { makeStyles } from "@mui/styles " ;
8
+ import { css } from "@emotion/css " ;
9
9
import { colors } from "theme/colors" ;
10
10
11
11
interface InfoTooltipProps {
@@ -17,31 +17,22 @@ interface InfoTooltipProps {
17
17
export const InfoTooltip : FC < InfoTooltipProps > = ( props ) => {
18
18
const { title, message, type = "info" } = props ;
19
19
20
- const styles = useStyles ( { type } ) ;
21
-
22
20
return (
23
21
< HelpTooltip
24
22
size = "small"
25
23
icon = { InfoIcon }
26
- iconClassName = { styles . icon }
27
- buttonClassName = { styles . button }
24
+ iconClassName = { css `
25
+ color : ${ type === "info" ? colors . blue [ 5 ] : colors . yellow [ 5 ] } ;
26
+ ` }
27
+ buttonClassName = { css `
28
+ opacity : 1 ;
29
+ & : hover {
30
+ opacity : 1 ;
31
+ }
32
+ ` }
28
33
>
29
34
< HelpTooltipTitle > { title } </ HelpTooltipTitle >
30
35
< HelpTooltipText > { message } </ HelpTooltipText >
31
36
</ HelpTooltip >
32
37
) ;
33
38
} ;
34
-
35
- const useStyles = makeStyles < unknown , Pick < InfoTooltipProps , "type" > > ( ( ) => ( {
36
- icon : ( { type } ) => ( {
37
- color : type === "info" ? colors . blue [ 5 ] : colors . yellow [ 5 ] ,
38
- } ) ,
39
-
40
- button : {
41
- opacity : 1 ,
42
-
43
- "&:hover" : {
44
- opacity : 1 ,
45
- } ,
46
- } ,
47
- } ) ) ;
You can’t perform that action at this time.
0 commit comments