Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui] Revert visual regressions from #42283 #43364

Merged
2 changes: 1 addition & 1 deletion packages/mui-material/src/InputBase/InputBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export const InputBaseInput = styled('input', {
display: 'block',
// Make the flex item shrink with Firefox
minWidth: 0,
flexGrow: 1,
width: '100%',
'&::-webkit-input-placeholder': placeholder,
'&::-moz-placeholder': placeholder, // Firefox 19+
'&::-ms-input-placeholder': placeholder, // Edge
Expand Down
1 change: 1 addition & 0 deletions packages/mui-material/src/StepLabel/StepLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ const StepLabelIconContainer = styled('span', {
slot: 'IconContainer',
overridesResolver: (props, styles) => styles.iconContainer,
})({
flexShrink: 0,
display: 'flex',
paddingRight: 8,
[`&.${stepLabelClasses.alternativeLabel}`]: {
Expand Down
24 changes: 24 additions & 0 deletions test/regressions/fixtures/StepLabel/NoShrinkIcon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as React from 'react';
import Stepper from '@mui/material/Stepper';
import Step from '@mui/material/Step';
import StepLabel from '@mui/material/StepLabel';

function TestIcon() {
return <div style={{ border: '1px solid red' }}>should not shrink</div>;
}

const steps = ['Step 1', 'Step 2'];

export default function CustomizedSteppers() {
return (
<Stepper sx={{ width: 200 }}>
{steps.map((label) => (
<Step key={label}>
<StepLabel StepIconComponent={TestIcon} sx={{ width: '1px' }}>
{label}
</StepLabel>
</Step>
))}
</Stepper>
);
}
16 changes: 16 additions & 0 deletions test/regressions/fixtures/TextField/ConstrainedTextField.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import * as React from 'react';
import TextField from '@mui/material/TextField';

// TextField shouldn't overflow the red bordered container
export default function ConstrainedTextField() {
return (
<div
style={{
width: 100,
border: '1px solid red',
}}
>
<TextField label="Outlined" variant="outlined" />
</div>
);
}
Loading