Skip to content

Commit db04550

Browse files
committed
refactor: fix mui v6 System props deprecations
1 parent 26b0de7 commit db04550

File tree

64 files changed

+138
-127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+138
-127
lines changed

src/components/BaseCard.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,7 @@ export const BaseCard = ({
8181
{!!header && (
8282
<CardHeader
8383
avatar={
84-
<Avatar
85-
sx={{
86-
fontFamily: "verdana",
87-
backgroundColor: header.color ?? "transparent",
88-
}}
89-
>
84+
<Avatar sx={{ fontFamily: "verdana", backgroundColor: header.color ?? "transparent" }}>
9085
{header.avatar?.[0].toUpperCase()}
9186
</Avatar>
9287
}

src/components/CreateDatasetStorageSubscription.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const CreateDatasetStorageSubscription = ({
6060
{({ submitForm, isSubmitting, isValid, values }) => {
6161
return (
6262
<Form>
63-
<Box alignItems="baseline" display="flex" flexWrap="wrap" gap={2}>
63+
<Box sx={{ alignItems: "baseline", display: "flex", flexWrap: "wrap", gap: 2 }}>
6464
<Field
6565
autoFocus
6666
component={TextField}

src/components/DataTable/DataTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export const DataTable = <Data extends Record<string, any>>(props: DataTableProp
170170
id: "expander",
171171
enableSorting: false,
172172
header: ({ table }) => (
173-
<Box display="flex">
173+
<Box sx={{ display: "flex" }}>
174174
<IconButton onClick={table.getToggleAllRowsExpandedHandler()}>
175175
{table.getIsAllRowsExpanded() ? <ExpandLess /> : <ExpandMoreIcon />}
176176
</IconButton>

src/components/DocsNav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const DocsNav = () => {
1515
const router = useRouter();
1616

1717
return (
18-
<Box aria-label="Docs" component="nav" display="flex" gap={2} role="navigation">
18+
<Box aria-label="Docs" component="nav" role="navigation" sx={{ display: "flex", gap: 2 }}>
1919
{Object.entries(links).map(([href, title]) => (
2020
<NextLink
2121
component="button"

src/components/FileSelector/FileSelector.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ export const FileSelector = ({ value, targetType, ...props }: SharedProps) => {
3636
<Collapse in={expanded}>
3737
<MiniFileList {...props} targetType={targetType} value={value} />
3838
</Collapse>
39-
<Box display="flex" paddingY={1}>
40-
{expanded ? closeControls : openControls}
41-
</Box>
39+
<Box sx={{ display: "flex", paddingY: 1 }}>{expanded ? closeControls : openControls}</Box>
4240
</>
4341
);
4442
};

src/components/FileSelector/MiniFileList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const MiniFileList = (props: SharedProps) => {
1818
);
1919

2020
return (
21-
<Box border="2px dashed" borderColor="grey.600" borderRadius={8} px={2} py={1}>
21+
<Box sx={{ border: "2px dashed", borderColor: "grey.600", borderRadius: 8, px: 2, py: 1 }}>
2222
<FormControlLabel
2323
control={
2424
<Checkbox

src/components/FileSelector/SelectedFilesLabel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface SelectedFilesLabelProps {
1515
*/
1616
export const SelectedFilesLabel = ({ files }: SelectedFilesLabelProps) => {
1717
return (
18-
<Typography noWrap display="inline" sx={{ whiteSpace: "break-spaces" }} variant="body2">
18+
<Typography noWrap sx={{ display: "inline", whiteSpace: "break-spaces" }} variant="body2">
1919
Selected Files:{" "}
2020
{files.length === 1 ? (
2121
files[0]

src/components/PageSection/PageSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const PageSection: FC<PageSectionProps> = ({ level, title, children }) =>
4040

4141
return (
4242
<PageSectionProvider level={nextLevel}>
43-
<Box component="section" marginBottom={4}>
43+
<Box component="section" sx={{ marginBottom: 4 }}>
4444
<Typography gutterBottom component={`h${realLevel}`} variant={`h${nextLevel}`}>
4545
{title}
4646
</Typography>

src/components/SMILESInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ export const SMILESInput = ({
139139
};
140140

141141
return (
142-
<Box display="flex" flexDirection="column" gap={1} width={width}>
143-
<Box height={height}>
142+
<Box sx={{ display: "flex", flexDirection: "column", gap: 1, width }}>
143+
<Box sx={{ height }}>
144144
<Sketcher smiles={smiles} />
145145
</Box>
146146
<ButtonGroup size="small" sx={{ alignSelf: "end" }} variant="outlined">

src/components/ScatterPlot/ScatterPlot.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,33 +135,33 @@ export const ScatterPlot = ({ molecules, properties, selectPoints, width }: Scat
135135
points?.length && selectPoints(points.map((p) => p.customdata) as string[]);
136136
}}
137137
/>
138-
<Box display="flex" gap={2}>
138+
<Box sx={{ display: "flex", gap: 2 }}>
139139
<div>
140-
<Typography gutterBottom component="label" display="block" variant="h5">
140+
<Typography gutterBottom component="label" sx={{ display: "block" }} variant="h5">
141141
x-axis
142142
</Typography>
143143
<AxisSelector prop={xprop} properties={properties} onPropChange={setXprop} />
144144
</div>
145145
<div>
146-
<Typography gutterBottom component="label" display="block" variant="h5">
146+
<Typography gutterBottom component="label" sx={{ display: "block" }} variant="h5">
147147
y-axis
148148
</Typography>
149149
<AxisSelector prop={yprop} properties={properties} onPropChange={setYprop} />
150150
</div>
151151
<div>
152-
<Typography gutterBottom component="label" display="block" variant="h5">
152+
<Typography gutterBottom component="label" sx={{ display: "block" }} variant="h5">
153153
colour-axis
154154
</Typography>
155155
<AxisSelector prop={cprop} properties={properties} onPropChange={setCprop} />
156156
<Tooltip arrow title="Toggle the colour bar">
157157
<Switch checked={showColourBar} onChange={() => setShowColourBar(!showColourBar)} />
158158
</Tooltip>
159159
{/* <div>
160-
<em>({colourExtent.min !== undefined && `${colourExtent.min}–${colourExtent.max}`})</em>
161-
</div> */}
160+
<em>({colourExtent.min !== undefined && `${colourExtent.min}–${colourExtent.max}`})</em>
161+
</div> */}
162162
</div>
163163
<div>
164-
<Typography gutterBottom component="label" display="block" variant="h5">
164+
<Typography gutterBottom component="label" sx={{ display: "block" }} variant="h5">
165165
size-axis
166166
</Typography>
167167
<AxisSelector prop={sprop} properties={properties} onPropChange={setSprop} />

0 commit comments

Comments
 (0)