From e4c76ce1783877230ea4bbac404d15c8447a1674 Mon Sep 17 00:00:00 2001 From: Kyle Zinter Date: Mon, 30 Jul 2018 11:55:39 -0700 Subject: [PATCH 1/2] Adding completed class to the root level of the Step component --- packages/material-ui/src/Step/Step.js | 5 ++++- pages/api/step.md | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/material-ui/src/Step/Step.js b/packages/material-ui/src/Step/Step.js index 1748a817df5ed0..be4a95c5106418 100644 --- a/packages/material-ui/src/Step/Step.js +++ b/packages/material-ui/src/Step/Step.js @@ -25,6 +25,8 @@ export const styles = { flex: 1, position: 'relative', }, + /* Styles applied to the root element if `completed={true}`. */ + completed: {}, }; function Step(props) { @@ -48,6 +50,7 @@ function Step(props) { classes[orientation], { [classes.alternativeLabel]: alternativeLabel, + [classes.completed]: completed }, classNameProp, ); @@ -144,4 +147,4 @@ Step.defaultProps = { disabled: false, }; -export default withStyles(styles, { name: 'MuiStep' })(Step); +export default withStyles(styles, { name: 'MuiStep' })(Step); \ No newline at end of file diff --git a/pages/api/step.md b/pages/api/step.md index 1efa061c7a31fb..a472f2c2606342 100644 --- a/pages/api/step.md +++ b/pages/api/step.md @@ -35,6 +35,7 @@ This property accepts the following keys: | horizontal | Styles applied to the root element if `orientation="horizontal"`. | vertical | Styles applied to the root element if `orientation="vertical"`. | alternativeLabel | Styles applied to the root element if `alternativeLabel={true}`. +| completed | 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) From 93a18a183fbb468182de100df7d9c2d1e0b1bd41 Mon Sep 17 00:00:00 2001 From: Kyle Zinter Date: Mon, 30 Jul 2018 14:02:33 -0700 Subject: [PATCH 2/2] Fixing eslint errors --- packages/material-ui/src/Step/Step.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/material-ui/src/Step/Step.js b/packages/material-ui/src/Step/Step.js index be4a95c5106418..370a464ecf8d34 100644 --- a/packages/material-ui/src/Step/Step.js +++ b/packages/material-ui/src/Step/Step.js @@ -50,7 +50,7 @@ function Step(props) { classes[orientation], { [classes.alternativeLabel]: alternativeLabel, - [classes.completed]: completed + [classes.completed]: completed, }, classNameProp, ); @@ -147,4 +147,4 @@ Step.defaultProps = { disabled: false, }; -export default withStyles(styles, { name: 'MuiStep' })(Step); \ No newline at end of file +export default withStyles(styles, { name: 'MuiStep' })(Step);