Skip to content

Commit

Permalink
[material-ui] Revert visual regressions from #42283 (#43364)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli authored Aug 20, 2024
1 parent e52c45e commit 58d14a6
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
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>
);
}

0 comments on commit 58d14a6

Please sign in to comment.