File tree 1 file changed +11
-16
lines changed
site/src/components/Dashboard/Navbar/UserDropdown 1 file changed +11
-16
lines changed Original file line number Diff line number Diff line change
1
+ import { css } from "@emotion/css" ;
2
+ import { useTheme } from "@emotion/react" ;
1
3
import Popover , { PopoverProps } from "@mui/material/Popover" ;
2
- import { makeStyles } from "@mui/styles" ;
3
- import { FC , PropsWithChildren } from "react" ;
4
+ import type { FC , PropsWithChildren } from "react" ;
4
5
5
6
type BorderedMenuVariant = "user-dropdown" ;
6
7
@@ -13,23 +14,17 @@ export const BorderedMenu: FC<PropsWithChildren<BorderedMenuProps>> = ({
13
14
variant,
14
15
...rest
15
16
} ) => {
16
- const styles = useStyles ( ) ;
17
+ const theme = useTheme ( ) ;
18
+
19
+ const paper = css `
20
+ width : 260px ;
21
+ border-radius : ${ theme . shape . borderRadius } ;
22
+ box-shadow : ${ theme . shadows [ 6 ] } ;
23
+ ` ;
17
24
18
25
return (
19
- < Popover
20
- classes = { { paper : styles . paperRoot } }
21
- data-variant = { variant }
22
- { ...rest }
23
- >
26
+ < Popover classes = { { paper } } data-variant = { variant } { ...rest } >
24
27
{ children }
25
28
</ Popover >
26
29
) ;
27
30
} ;
28
-
29
- const useStyles = makeStyles ( ( theme ) => ( {
30
- paperRoot : {
31
- width : 260 ,
32
- borderRadius : theme . shape . borderRadius ,
33
- boxShadow : theme . shadows [ 6 ] ,
34
- } ,
35
- } ) ) ;
You can’t perform that action at this time.
0 commit comments