@@ -11,6 +11,7 @@ import Button from "@mui/material/Button";
11
11
import Link from "@mui/material/Link" ;
12
12
import AddIcon from "@mui/icons-material/AddOutlined" ;
13
13
import OpenIcon from "@mui/icons-material/OpenInNewOutlined" ;
14
+ import Typography from "@mui/material/Typography" ;
14
15
15
16
import { Loader } from "components/Loader/Loader" ;
16
17
import { OverflowY } from "components/OverflowY/OverflowY" ;
@@ -21,6 +22,7 @@ import {
21
22
PopoverContainer ,
22
23
PopoverLink ,
23
24
} from "components/PopoverContainer/PopoverContainer" ;
25
+ import { useTheme } from "@emotion/react" ;
24
26
25
27
const ICON_SIZE = 18 ;
26
28
const COLUMN_GAP = 1.5 ;
@@ -42,6 +44,8 @@ function sortTemplatesByUsersDesc(
42
44
}
43
45
44
46
function WorkspaceResultsRow ( { template } : { template : Template } ) {
47
+ const theme = useTheme ( ) ;
48
+
45
49
return (
46
50
< PopoverLink to = { `/templates/${ template . name } /workspace` } >
47
51
< Box
@@ -76,25 +80,20 @@ function WorkspaceResultsRow({ template }: { template: Template }) {
76
80
color : "white" ,
77
81
} }
78
82
>
79
- < Box
83
+ < Typography
80
84
component = "p"
81
- sx = { {
82
- marginY : 0 ,
83
- paddingBottom : 0.5 ,
84
- overflow : "hidden" ,
85
- textOverflow : "ellipsis" ,
86
- whiteSpace : "nowrap" ,
87
- } }
85
+ sx = { { marginY : 0 , paddingBottom : 0.5 , lineHeight : 1 } }
86
+ noWrap
88
87
>
89
88
{ template . display_name || "[Unnamed]" }
90
- </ Box >
89
+ </ Typography >
91
90
92
91
< Box
93
92
component = "p"
94
93
sx = { {
95
94
marginY : 0 ,
96
95
fontSize : 14 ,
97
- color : ( theme ) => theme . palette . text . secondary ,
96
+ color : theme . palette . text . secondary ,
98
97
} }
99
98
>
100
99
{ /*
@@ -118,6 +117,7 @@ export function WorkspacesButton() {
118
117
const organizationId = useOrganizationId ( ) ;
119
118
const permissions = usePermissions ( ) ;
120
119
const templatesQuery = useQuery ( templates ( organizationId ) ) ;
120
+ const theme = useTheme ( ) ;
121
121
122
122
// Dataset should always be small enough that client-side filtering should be
123
123
// good enough. Can swap out down the line if it becomes an issue
@@ -192,7 +192,7 @@ export function WorkspacesButton() {
192
192
sx = { {
193
193
outline : "none" ,
194
194
"&:focus" : {
195
- backgroundColor : ( theme ) => theme . palette . action . focus ,
195
+ backgroundColor : theme . palette . action . focus ,
196
196
} ,
197
197
} }
198
198
>
@@ -203,7 +203,7 @@ export function WorkspacesButton() {
203
203
flexFlow : "row nowrap" ,
204
204
alignItems : "center" ,
205
205
columnGap : COLUMN_GAP ,
206
- borderTop : ( theme ) => `1px solid ${ theme . palette . divider } ` ,
206
+ borderTop : `1px solid ${ theme . palette . divider } ` ,
207
207
} }
208
208
>
209
209
< Box component = "span" sx = { { width : `${ ICON_SIZE } px` } } >
0 commit comments