Skip to content

Commit 9466fdf

Browse files
committed
chore: [PROD-13949] update depreciated props
1 parent f0fef91 commit 9466fdf

File tree

23 files changed

+76
-57
lines changed

23 files changed

+76
-57
lines changed

src/buttons/RolesEditionButton/components/RolesEditionDialog/RolesEditionDialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const RolesEditionDialog = ({
171171
</Grid>
172172
<Grid container>
173173
{hasNoAdmin && (
174-
<Typography data-cy="no-admin-error-message" variant="caption" color="error" paragraph={true}>
174+
<Typography data-cy="no-admin-error-message" variant="caption" color="error" sx={{ mb: 2 }}>
175175
{labels.noAdminError}
176176
</Typography>
177177
)}

src/buttons/SignInButton/SignInButton.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const SignInButton = (props) => {
3636

3737
return (
3838
<button className={classes.root} onClick={onClick} data-cy={'sign-in-with-' + id + '-button'}>
39-
<Grid container spacing={0} direction="row" alignItems="center" justifyContent="flex-start">
39+
<Grid container spacing={0} direction="row" sx={{ alignItems: 'center', justifyContent: 'flex-start' }}>
4040
<Grid item>
4141
<Avatar className={classes.logo} variant="square" src={logo} />
4242
</Grid>

src/cards/ScenarioNode/ScenarioNode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export const ScenarioNode = ({
205205
</Typography>
206206
</Typography>
207207
</FadingTooltip>
208-
<Typography variant="subtitle2" component="span" mx={0.5}>
208+
<Typography variant="subtitle2" component="span" sx={{ mx: 0.5 }}>
209209
|
210210
</Typography>
211211
<FadingTooltip title={labels.dataset + ' ' + datasetNames}>
@@ -248,7 +248,7 @@ export const ScenarioNode = ({
248248

249249
const getScenarioHeader = () => {
250250
return (
251-
<Box className={classes.scenarioHeader} flexGrow={1}>
251+
<Box className={classes.scenarioHeader} sx={{ flexGrow: 1 }}>
252252
{isExpanded ? getScenarioCreationData() : getScenarioDetailNameLine(false)}
253253
</Box>
254254
);

src/charts/CytoViz/CytoViz.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -494,13 +494,15 @@ export const CytoViz = (props) => {
494494
helperText={explorationDepthFieldHasError ? labels_.accordion.exploreGraph.limitDepthError : ''}
495495
value={explorationDepth}
496496
onChange={checkExplorationDepth}
497-
InputProps={{
498-
inputProps: {
499-
max: 1000,
500-
min: 1,
497+
variant="standard"
498+
slotProps={{
499+
input: {
500+
inputProps: {
501+
max: 1000,
502+
min: 1,
503+
},
501504
},
502505
}}
503-
variant="standard"
504506
/>
505507
<div>
506508
<p>{labels_.accordion.exploreGraph.flowDirection}</p>

src/charts/CytoViz/components/TabPanel/TabPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const TabPanel = (props) => {
1515
aria-labelledby={`drawer-tab-${index}`}
1616
{...other}
1717
>
18-
{value === index && <Box p={3}>{children}</Box>}
18+
{value === index && <Box sx={{ p: 3 }}>{children}</Box>}
1919
</div>
2020
);
2121
};

src/charts/Dashboard/components/DashboardPlaceholder/DashboardPlaceholder.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,19 @@ const DashboardPlaceholder = (props) => {
3030
<Grid
3131
container
3232
direction="column"
33-
justifyContent="center"
3433
wrap="nowrap"
35-
alignItems="center"
3634
className={classes.gridContainer}
35+
sx={{
36+
justifyContent: 'center',
37+
alignItems: 'center',
38+
}}
3739
>
3840
<Grid>
3941
<Typography variant="h3">{title}</Typography>
4042
</Grid>
4143
<Grid item>
4244
{icon !== undefined && <div className={classes.iconContainer}>{icon}</div>}
43-
<Typography data-cy="dashboard-placeholder" color="textSecondary" variant="body1" className={classes.label}>
45+
<Typography data-cy="dashboard-placeholder" variant="body1" className={classes.label} color="textSecondary">
4446
{label}
4547
</Typography>
4648
{inProgress && <LinearProgress data-cy="dashboard-in-progress" className={classes.linearProgress} />}

src/inputs/BasicInputs/BasicDateInput/BasicDateInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ export const BasicDateInput = (props) => {
8383
data-cy={`date-input-${id}`}
8484
direction="row"
8585
spacing={1}
86-
alignItems="center"
8786
className={isDirty ? classes.dirtyInput : isDirty === false ? classes.notDirtyInput : ''}
87+
sx={{ alignItems: 'center' }}
8888
>
8989
<LocalizationProvider dateAdapter={AdapterDateFns}>
9090
<DesktopDatePicker

src/inputs/BasicInputs/BasicEnumInput/BasicEnumInput.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ export const BasicEnumInput = (props) => {
4747
data-cy={`enum-input-${id}`}
4848
direction="row"
4949
spacing={1}
50-
alignItems="center"
5150
className={isDirty ? classes.dirtyInput : isDirty === false ? classes.notDirtyInput : ''}
51+
sx={{
52+
alignItems: 'center',
53+
}}
5254
>
5355
<TextField
5456
variant="outlined"
@@ -57,14 +59,16 @@ export const BasicEnumInput = (props) => {
5759
sx={{ flexGrow: 1 }}
5860
select
5961
value={typeof valueKey === 'string' ? valueKey : ''}
60-
SelectProps={{
61-
renderValue: (key) => (
62-
<Box style={{ overflow: 'hidden', textOverflow: 'ellipsis' }}>{getLabelFromEnumKey(key)}</Box>
63-
), // Prevent extra padding on selected value
64-
'data-cy': `enum-input-select-${id}`,
65-
MenuProps: { 'data-cy': `enum-input-menu-${id}` },
66-
}}
6762
onChange={(event) => changeEnumField(event.target.value)}
63+
slotProps={{
64+
select: {
65+
renderValue: (key) => (
66+
<Box style={{ overflow: 'hidden', textOverflow: 'ellipsis' }}>{getLabelFromEnumKey(key)}</Box>
67+
), // Prevent extra padding on selected value
68+
'data-cy': `enum-input-select-${id}`,
69+
MenuProps: { 'data-cy': `enum-input-menu-${id}` },
70+
},
71+
}}
6872
>
6973
{enumValues.map((option) => (
7074
<MenuItem

src/inputs/BasicInputs/BasicInputPlaceholder/BasicInputPlaceholder.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ import { TooltipInfo } from '../../../misc';
88
export const BasicInputPlaceholder = ({ id, label, tooltipText, value, ...otherProps }) => {
99
return (
1010
<Stack data-cy={id}>
11-
<Stack spacing={1} direction="row" alignItems="center">
12-
<Typography data-cy="disabled-input-label" variant="subtitle2" color="textSecondary">
11+
<Stack
12+
spacing={1}
13+
direction="row"
14+
sx={{
15+
alignItems: 'center',
16+
}}
17+
>
18+
<Typography data-cy="disabled-input-label" variant="subtitle2" sx={{ color: 'textSecondary' }}>
1319
{label}
1420
</Typography>
1521
<TooltipInfo title={tooltipText} />

src/inputs/BasicInputs/BasicNumberInput/BasicNumberInput.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ export const BasicNumberInput = (props) => {
8989
data-cy={`number-input-${id}`}
9090
direction="row"
9191
spacing={1}
92-
alignItems="center"
9392
className={isDirty ? classes.dirtyInput : isDirty === false ? classes.notDirtyInput : ''}
93+
sx={{ alignItems: 'center' }}
9494
>
9595
<TextField
9696
id={`number-input-${id}`}
@@ -102,12 +102,12 @@ export const BasicNumberInput = (props) => {
102102
onChange={handleChangeEvent}
103103
onBlur={handleBlurEvent}
104104
onFocus={handleFocusEvent}
105-
inputProps={inputProps}
106-
InputProps={{
107-
inputComponent: NumberFormat,
108-
}}
109105
error={!!error}
110106
helperText={error?.message ?? ''}
107+
slotProps={{
108+
input: { inputComponent: NumberFormat },
109+
htmlInput: inputProps,
110+
}}
111111
/>
112112
<TooltipInfo title={tooltipText} variant="small" />
113113
</Stack>

0 commit comments

Comments
 (0)