Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[StepButton] Support vertical stepper #10698

Merged
merged 2 commits into from Mar 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions pages/api/step-button.md
Expand Up @@ -23,6 +23,7 @@ Any other properties supplied will be [spread to the root element](/guides/api#s
You can override all the class names injected by Material-UI thanks to the `classes` property.
This property accepts the following keys:
- `root`
- `vertical`
- `touchRipple`

Have a look at [overriding with classes](/customization/overrides#overriding-with-classes) section
Expand Down
11 changes: 10 additions & 1 deletion src/Stepper/StepButton.js
Expand Up @@ -15,6 +15,9 @@ export const styles = theme => ({
margin: `${-theme.spacing.unit * 3}px ${-theme.spacing.unit * 2}px`,
boxSizing: 'content-box',
},
vertical: {
justifyContent: 'left',
},
touchRipple: {
color: 'rgba(0, 0, 0, 0.3)',
},
Expand Down Expand Up @@ -55,7 +58,13 @@ function StepButton(props) {
<ButtonBase
disabled={disabled}
TouchRippleProps={{ className: classes.touchRipple }}
className={classNames(classes.root, classNameProp)}
className={classNames(
classes.root,
{
[classes.vertical]: orientation === 'vertical',
},
classNameProp,
)}
{...other}
>
{child}
Expand Down