Skip to content
Merged
2 changes: 1 addition & 1 deletion docs/pages/material-ui/api/step-icon.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"muiName": "MuiStepIcon",
"forwardsRefTo": "SVGSVGElement",
"filename": "/packages/mui-material/src/StepIcon/StepIcon.js",
"inheritance": null,
"inheritance": { "component": "SvgIcon", "pathname": "/material-ui/api/svg-icon/" },
"demos": "<ul><li><a href=\"/material-ui/react-stepper/\">Stepper</a></li></ul>",
"cssComponent": false
}
6 changes: 4 additions & 2 deletions packages/mui-material/src/StepIcon/StepIcon.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps } from '..';
import { InternalStandardProps as StandardProps, SvgIconProps } from '..';
import { Theme } from '../styles';
import { StepIconClasses } from './stepIconClasses';

export interface StepIconProps
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'> {
extends Omit<StandardProps<React.HTMLAttributes<SVGSVGElement>, 'color' | 'children'>, 'ref'>,
Omit<SvgIconProps, 'children'> {
/**
* Whether this step is active.
* @default false
Expand Down Expand Up @@ -46,5 +47,6 @@ export type StepIconClasskey = keyof NonNullable<StepIconProps['classes']>;
* API:
*
* - [StepIcon API](https://mui.com/material-ui/api/step-icon/)
* - inherits [SvgIcon API](https://mui.com/material-ui/api/svg-icon/)
*/
export default function StepIcon(props: StepIconProps): React.JSX.Element;
5 changes: 5 additions & 0 deletions packages/mui-material/src/StepIcon/StepIcon.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as React from 'react';
import StepIcon from '@mui/material/StepIcon';

<StepIcon icon={<div>icon</div>} />;
<StepIcon icon={<div>icon</div>} titleAccess="title" />;
3 changes: 2 additions & 1 deletion packages/mui-material/src/StepIcon/StepIcon.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import * as React from 'react';
import { expect } from 'chai';
import { createRenderer } from '@mui/internal-test-utils';
import StepIcon, { stepIconClasses as classes } from '@mui/material/StepIcon';
import SvgIcon from '@mui/material/SvgIcon';
import describeConformance from '../../test/describeConformance';

describe('<StepIcon />', () => {
const { render } = createRenderer();

describeConformance(<StepIcon icon={1} />, () => ({
classes,
inheritComponent: 'svg',
inheritComponent: SvgIcon,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is to display Props of the SvgIcon component are also available. in props table.

https://deploy-preview-44337--material-ui.netlify.app/material-ui/api/step-icon/#props

render,
muiName: 'MuiStepIcon',
testVariantProps: { completed: true },
Expand Down