Skip to content

Commit 58d14a6

Browse files
[material-ui] Revert visual regressions from #42283 (#43364)
1 parent e52c45e commit 58d14a6

File tree

4 files changed

+42
-1
lines changed

4 files changed

+42
-1
lines changed

packages/mui-material/src/InputBase/InputBase.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export const InputBaseInput = styled('input', {
182182
display: 'block',
183183
// Make the flex item shrink with Firefox
184184
minWidth: 0,
185-
flexGrow: 1,
185+
width: '100%',
186186
'&::-webkit-input-placeholder': placeholder,
187187
'&::-moz-placeholder': placeholder, // Firefox 19+
188188
'&::-ms-input-placeholder': placeholder, // Edge

packages/mui-material/src/StepLabel/StepLabel.js

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ const StepLabelIconContainer = styled('span', {
103103
slot: 'IconContainer',
104104
overridesResolver: (props, styles) => styles.iconContainer,
105105
})({
106+
flexShrink: 0,
106107
display: 'flex',
107108
paddingRight: 8,
108109
[`&.${stepLabelClasses.alternativeLabel}`]: {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import * as React from 'react';
2+
import Stepper from '@mui/material/Stepper';
3+
import Step from '@mui/material/Step';
4+
import StepLabel from '@mui/material/StepLabel';
5+
6+
function TestIcon() {
7+
return <div style={{ border: '1px solid red' }}>should not shrink</div>;
8+
}
9+
10+
const steps = ['Step 1', 'Step 2'];
11+
12+
export default function CustomizedSteppers() {
13+
return (
14+
<Stepper sx={{ width: 200 }}>
15+
{steps.map((label) => (
16+
<Step key={label}>
17+
<StepLabel StepIconComponent={TestIcon} sx={{ width: '1px' }}>
18+
{label}
19+
</StepLabel>
20+
</Step>
21+
))}
22+
</Stepper>
23+
);
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import * as React from 'react';
2+
import TextField from '@mui/material/TextField';
3+
4+
// TextField shouldn't overflow the red bordered container
5+
export default function ConstrainedTextField() {
6+
return (
7+
<div
8+
style={{
9+
width: 100,
10+
border: '1px solid red',
11+
}}
12+
>
13+
<TextField label="Outlined" variant="outlined" />
14+
</div>
15+
);
16+
}

0 commit comments

Comments
 (0)