Skip to content

Commit

Permalink
[Step] Add completed class to the root (#12339)
Browse files Browse the repository at this point in the history
* Adding completed class to the root level of the Step component

* Fixing eslint errors
  • Loading branch information
kylezinter authored and oliviertassinari committed Jul 30, 2018
1 parent bfc0acb commit dde9d44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/material-ui/src/Step/Step.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export const styles = {
flex: 1,
position: 'relative',
},
/* Styles applied to the root element if `completed={true}`. */
completed: {},
};

function Step(props) {
Expand All @@ -48,6 +50,7 @@ function Step(props) {
classes[orientation],
{
[classes.alternativeLabel]: alternativeLabel,
[classes.completed]: completed,
},
classNameProp,
);
Expand Down
1 change: 1 addition & 0 deletions pages/api/step.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ This property accepts the following keys:
| <span class="prop-name">horizontal</span> | Styles applied to the root element if `orientation="horizontal"`.
| <span class="prop-name">vertical</span> | Styles applied to the root element if `orientation="vertical"`.
| <span class="prop-name">alternativeLabel</span> | Styles applied to the root element if `alternativeLabel={true}`.
| <span class="prop-name">completed</span> | Styles applied to the root element if `completed={true}`.

Have a look at [overriding with classes](/customization/overrides#overriding-with-classes) section
and the [implementation of the component](https://github.com/mui-org/material-ui/tree/master/packages/material-ui/src/Step/Step.js)
Expand Down

0 comments on commit dde9d44

Please sign in to comment.