1
+ import { type Interpolation , type Theme } from "@emotion/react" ;
1
2
import Button from "@mui/material/Button" ;
2
- import { makeStyles } from "@mui/styles" ;
3
+ import { type FC , useState } from "react" ;
4
+ import type { WorkspaceAgent , WorkspaceResource } from "api/typesGenerated" ;
3
5
import { DropdownArrow } from "components/DropdownArrow/DropdownArrow" ;
4
- import { FC , useState } from "react" ;
5
- import { WorkspaceAgent , WorkspaceResource } from "api/typesGenerated" ;
6
6
import { Stack } from "../Stack/Stack" ;
7
7
import { ResourceCard } from "./ResourceCard" ;
8
8
@@ -19,7 +19,6 @@ export const Resources: FC<React.PropsWithChildren<ResourcesProps>> = ({
19
19
resources,
20
20
agentRow,
21
21
} ) => {
22
- const styles = useStyles ( ) ;
23
22
const [ shouldDisplayHideResources , setShouldDisplayHideResources ] =
24
23
useState ( false ) ;
25
24
const displayResources = shouldDisplayHideResources
@@ -40,9 +39,9 @@ export const Resources: FC<React.PropsWithChildren<ResourcesProps>> = ({
40
39
/>
41
40
) ) }
42
41
{ hasHideResources && (
43
- < div className = { styles . buttonWrapper } >
42
+ < div css = { styles . buttonWrapper } >
44
43
< Button
45
- className = { styles . showMoreButton }
44
+ css = { styles . showMoreButton }
46
45
size = "small"
47
46
onClick = { ( ) => setShouldDisplayHideResources ( ( v ) => ! v ) }
48
47
>
@@ -55,17 +54,17 @@ export const Resources: FC<React.PropsWithChildren<ResourcesProps>> = ({
55
54
) ;
56
55
} ;
57
56
58
- const useStyles = makeStyles ( ( theme ) => ( {
59
- buttonWrapper : {
57
+ const styles = {
58
+ buttonWrapper : ( theme ) => ( {
60
59
display : "flex" ,
61
60
alignItems : "center" ,
62
61
justifyContent : "center" ,
63
62
marginTop : theme . spacing ( 2 ) ,
64
- } ,
63
+ } ) ,
65
64
66
65
showMoreButton : {
67
66
borderRadius : 9999 ,
68
67
width : "100%" ,
69
68
maxWidth : 260 ,
70
69
} ,
71
- } ) ) ;
70
+ } satisfies Record < string , Interpolation < Theme > > ;
0 commit comments