Skip to content

Commit

Permalink
naming convention other > rest
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Mar 31, 2021
1 parent 0d3e5d1 commit f6475bf
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions docs/src/pages/components/cards/RecipeReviewCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import MoreVertIcon from '@material-ui/icons/MoreVert';

const ExpandMore = styled((props) => {
const { expand, ...rest } = props;
return <IconButton {...rest} />;
const { expand, ...other } = props;
return <IconButton {...other} />;
})(({ theme, expand }) => ({
transform: !expand ? 'rotate(0deg)' : 'rotate(180deg)',
marginLeft: 'auto',
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/cards/RecipeReviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ interface ExpandMoreProps extends IconButtonProps {
}

const ExpandMore = styled((props: ExpandMoreProps) => {
const { expand, ...rest } = props;
return <IconButton {...rest} />;
const { expand, ...other } = props;
return <IconButton {...other} />;
})(({ theme, expand }) => ({
transform: !expand ? 'rotate(0deg)' : 'rotate(180deg)',
marginLeft: 'auto',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ describe('<BackdropUnstyled />', () => {
let theme = null;

const Root = React.forwardRef(
({ styleProps: stylePropsProp, theme: themeProp, ...rest }, ref) => {
({ styleProps: stylePropsProp, theme: themeProp, ...other }, ref) => {
styleProps = stylePropsProp;
theme = themeProp;
return <span ref={ref} {...rest} />;
return <span ref={ref} {...other} />;
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ describe('<BadgeUnstyled />', () => {
let theme = null;

const Root = React.forwardRef(
({ styleProps: stylePropsProp, theme: themeProp, ...rest }, ref) => {
({ styleProps: stylePropsProp, theme: themeProp, ...other }, ref) => {
styleProps = stylePropsProp;
theme = themeProp;
return <span ref={ref} {...rest} />;
return <span ref={ref} {...other} />;
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ describe('<ModalUnstyled />', () => {
let theme = null;

const Root = React.forwardRef(
({ styleProps: stylePropsProp, theme: themeProp, ...rest }, ref) => {
({ styleProps: stylePropsProp, theme: themeProp, ...other }, ref) => {
styleProps = stylePropsProp;
theme = themeProp;
return <span ref={ref} {...rest} />;
return <span ref={ref} {...other} />;
},
);

Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui-utils/src/integerPropType.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ function requiredInteger(props, propName, componentName, location) {
return null;
}

function validator(props, propName, ...rest) {
function validator(props, propName, ...other) {
const propValue = props[propName];

if (propValue === undefined) {
return null;
}

return requiredInteger(props, propName, ...rest);
return requiredInteger(props, propName, ...other);
}

function validatorNoop() {
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/StepContent/StepContent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ describe('<StepContent />', () => {
muiName: 'MuiStepContent',
refInstanceof: window.HTMLDivElement,
render: (node) => {
const { container, ...rest } = render(
const { container, ...other } = render(
<Stepper orientation="vertical">
<Step>{node}</Step>
</Stepper>,
);
return { container: container.firstChild.firstChild, ...rest };
return { container: container.firstChild.firstChild, ...other };
},
skip: ['componentProp', 'componentsProp', 'themeVariants', 'reactTestRenderer'],
}));
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/TableBody/TableBody.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ describe('<TableBody />', () => {
return wrapper.find('table').childAt(0);
},
render: (node) => {
const { container, ...rest } = render(<table>{node}</table>);
return { container: container.firstChild, ...rest };
const { container, ...other } = render(<table>{node}</table>);
return { container: container.firstChild, ...other };
},
muiName: 'MuiTableBody',
testVariantProps: { variant: 'foo' },
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/TableCell/TableCell.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ describe('<TableCell />', () => {
classes,
inheritComponent: 'td',
render: (node) => {
const { container, ...rest } = render(
const { container, ...other } = render(
<table>
<tbody>
<tr>{node}</tr>
</tbody>
</table>,
);
return { container: container.firstChild.firstChild.firstChild, ...rest };
return { container: container.firstChild.firstChild.firstChild, ...other };
},
mount: (node) => {
const wrapper = mount(
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/TableFooter/TableFooter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ describe('<TableFooter />', () => {
classes,
inheritComponent: 'tfoot',
render: (node) => {
const { container, ...rest } = render(<table>{node}</table>);
return { container: container.firstChild, ...rest };
const { container, ...other } = render(<table>{node}</table>);
return { container: container.firstChild, ...other };
},
mount: (node) => {
const wrapper = mount(<table>{node}</table>);
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/TableHead/TableHead.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ describe('<TableHead />', () => {
return wrapper.find('table').childAt(0);
},
render: (node) => {
const { container, ...rest } = render(<table>{node}</table>);
return { container: container.firstChild, ...rest };
const { container, ...other } = render(<table>{node}</table>);
return { container: container.firstChild, ...other };
},
muiName: 'MuiTableHead',
testVariantProps: { variant: 'foo' },
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/TableRow/TableRow.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ describe('<TableRow />', () => {
classes,
inheritComponent: 'tr',
render: (node) => {
const { container, ...rest } = render(
const { container, ...other } = render(
<table>
<tbody>{node}</tbody>
</table>,
);
return { container: container.firstChild.firstChild, ...rest };
return { container: container.firstChild.firstChild, ...other };
},
mount: (node) => {
const wrapper = mount(
Expand Down

0 comments on commit f6475bf

Please sign in to comment.