Skip to content

Commit

Permalink
[core] Avoid visual regression when using @mui/material@6 (#14357)
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii authored Aug 27, 2024
1 parent 1080a76 commit 1fadc9e
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/data/data-grid/row-height/ExpandableCells.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function ExpandableCell({ value }) {
<Link
type="button"
component="button"
sx={{ fontSize: 'inherit' }}
sx={{ fontSize: 'inherit', letterSpacing: 'inherit' }}
onClick={() => setExpanded(!expanded)}
>
{expanded ? 'view less' : 'view more'}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/data-grid/row-height/ExpandableCells.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function ExpandableCell({ value }: GridRenderCellParams) {
<Link
type="button"
component="button"
sx={{ fontSize: 'inherit' }}
sx={{ fontSize: 'inherit', letterSpacing: 'inherit' }}
onClick={() => setExpanded(!expanded)}
>
{expanded ? 'view less' : 'view more'}
Expand Down
3 changes: 3 additions & 0 deletions docs/data/date-pickers/custom-field/BrowserV6Field.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const BrowserField = React.forwardRef((props, ref) => {
{
display: 'flex',
alignItems: 'center',
'& .MuiInputAdornment-root': {
height: 'auto',
},
},
sx || {},
]}
Expand Down
3 changes: 3 additions & 0 deletions docs/data/date-pickers/custom-field/BrowserV6Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ const BrowserField = React.forwardRef(
{
display: 'flex',
alignItems: 'center',
'& .MuiInputAdornment-root': {
height: 'auto',
},
},
sx || {},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const BrowserSingleInputDateRangeField = React.forwardRef((props, ref) => {
textFieldProps.InputProps = {
...textFieldProps.InputProps,
endAdornment: (
<InputAdornment position="end">
<InputAdornment position="end" sx={{ height: 'auto' }}>
<IconButton onClick={onAdornmentClick}>
<DateRangeIcon />
</IconButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const BrowserSingleInputDateRangeField = React.forwardRef(
textFieldProps.InputProps = {
...textFieldProps.InputProps,
endAdornment: (
<InputAdornment position="end">
<InputAdornment position="end" sx={{ height: 'auto' }}>
<IconButton onClick={onAdornmentClick}>
<DateRangeIcon />
</IconButton>
Expand Down
3 changes: 3 additions & 0 deletions docs/data/date-pickers/custom-field/BrowserV7Field.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import { Unstable_PickersSectionList as PickersSectionList } from '@mui/x-date-p
const BrowserFieldRoot = styled('div', { name: 'BrowserField', slot: 'Root' })({
display: 'flex',
alignItems: 'center',
'& .MuiInputAdornment-root': {
height: 'auto',
},
});

const BrowserFieldContent = styled('div', { name: 'BrowserField', slot: 'Content' })(
Expand Down
3 changes: 3 additions & 0 deletions docs/data/date-pickers/custom-field/BrowserV7Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import { Unstable_PickersSectionList as PickersSectionList } from '@mui/x-date-p
const BrowserFieldRoot = styled('div', { name: 'BrowserField', slot: 'Root' })({
display: 'flex',
alignItems: 'center',
'& .MuiInputAdornment-root': {
height: 'auto',
},
});

const BrowserFieldContent = styled('div', { name: 'BrowserField', slot: 'Content' })(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import { Unstable_PickersSectionList as PickersSectionList } from '@mui/x-date-p
const BrowserFieldRoot = styled('div', { name: 'BrowserField', slot: 'Root' })({
display: 'flex',
alignItems: 'center',
'& .MuiInputAdornment-root': {
height: 'auto',
},
});

const BrowserFieldContent = styled('div', { name: 'BrowserField', slot: 'Content' })(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ import { BaseSingleInputFieldProps } from '@mui/x-date-pickers/models';
const BrowserFieldRoot = styled('div', { name: 'BrowserField', slot: 'Root' })({
display: 'flex',
alignItems: 'center',
'& .MuiInputAdornment-root': {
height: 'auto',
},
});

const BrowserFieldContent = styled('div', { name: 'BrowserField', slot: 'Content' })(
Expand Down

0 comments on commit 1fadc9e

Please sign in to comment.