diff --git a/packages/material-ui/src/StepIcon/StepIcon.js b/packages/material-ui/src/StepIcon/StepIcon.js index 6fa0014366efe0..ebce6ebc17cbcc 100644 --- a/packages/material-ui/src/StepIcon/StepIcon.js +++ b/packages/material-ui/src/StepIcon/StepIcon.js @@ -36,10 +36,18 @@ export const styles = (theme) => ({ }); const StepIcon = React.forwardRef(function StepIcon(props, ref) { - const { completed = false, icon, active = false, error = false, classes } = props; + const { + active = false, + classes, + className: classNameProp, + completed = false, + error = false, + icon, + ...other + } = props; if (typeof icon === 'number' || typeof icon === 'string') { - const className = clsx(classes.root, { + const className = clsx(classNameProp, classes.root, { [classes.active]: active, [classes.error]: error, [classes.completed]: completed, @@ -54,7 +62,7 @@ const StepIcon = React.forwardRef(function StepIcon(props, ref) { } return ( - + {icon} @@ -80,6 +88,10 @@ StepIcon.propTypes = { * Override or extend the styles applied to the component. */ classes: PropTypes.object, + /** + * @ignore + */ + className: PropTypes.string, /** * Mark the step as completed. Is passed to child components. * @default false diff --git a/packages/material-ui/src/StepIcon/StepIcon.test.js b/packages/material-ui/src/StepIcon/StepIcon.test.js index 876ce47ae3709b..5f2f013aa2e56c 100644 --- a/packages/material-ui/src/StepIcon/StepIcon.test.js +++ b/packages/material-ui/src/StepIcon/StepIcon.test.js @@ -1,16 +1,23 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createMount, describeConformance, createClientRender } from 'test/utils'; +import { createMount, getClasses, describeConformance, createClientRender } from 'test/utils'; import StepIcon from './StepIcon'; describe('', () => { const render = createClientRender(); const mount = createMount(); + let classes; + + before(() => { + classes = getClasses(); + }); describeConformance(, () => ({ + classes, + inheritComponent: 'svg', mount, - only: ['refForwarding'], refInstanceof: window.SVGSVGElement, + skip: ['componentProp'], })); it('renders when completed', () => {