Skip to content

Commit

Permalink
Merge branch 'master' into jsdoc-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan committed Apr 15, 2020
2 parents d0b79d8 + b145c27 commit f3a9e28
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 2 deletions.
15 changes: 15 additions & 0 deletions packages/components/docs/sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -21432,6 +21432,11 @@ Progress indicator styles
}
}

.#{$prefix}--progress--space-equal .#{$prefix}--progress-step {
min-width: 8rem;
flex-grow: 1;
}

.#{$prefix}--progress-line {
position: absolute;
left: 0;
Expand All @@ -21440,6 +21445,11 @@ Progress indicator styles
border: $progress-indicator-bar-width;
}

.#{$prefix}--progress--space-equal .#{$prefix}--progress-line {
min-width: rem(128px);
width: 100%;
}

.#{$prefix}--progress-step svg {
position: relative;
z-index: 1;
Expand Down Expand Up @@ -21480,6 +21490,11 @@ Progress indicator styles
box-shadow: 0 rem(3px) 0 0 $link-01;
}

.#{$prefix}--progress--space-equal .#{$prefix}--progress-label {
max-width: 100%;
margin-right: 0.75rem;
}

.#{$prefix}--progress-label:active {
color: $interactive-01;
box-shadow: 0 rem(3px) 0 0 $interactive-01;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
}
}

.#{$prefix}--progress--space-equal .#{$prefix}--progress-step {
min-width: 8rem;
flex-grow: 1;
}

.#{$prefix}--progress-line {
position: absolute;
left: 0;
Expand All @@ -42,6 +47,11 @@
border: $progress-indicator-bar-width;
}

.#{$prefix}--progress--space-equal .#{$prefix}--progress-line {
min-width: rem(128px);
width: 100%;
}

.#{$prefix}--progress-step svg {
position: relative;
z-index: 1;
Expand Down Expand Up @@ -82,6 +92,11 @@
box-shadow: 0 rem(3px) 0 0 $link-01;
}

.#{$prefix}--progress--space-equal .#{$prefix}--progress-label {
max-width: 100%;
margin-right: 0.75rem;
}

.#{$prefix}--progress-label:active {
color: $interactive-01;
box-shadow: 0 rem(3px) 0 0 $interactive-01;
Expand Down
3 changes: 3 additions & 0 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4024,6 +4024,9 @@ Map {
"onChange": Object {
"type": "func",
},
"spaceEqually": Object {
"type": "bool",
},
"vertical": Object {
"type": "bool",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ storiesOf('ProgressIndicator', module)
() => (
<ProgressIndicator
vertical={boolean('Vertical', false)}
currentIndex={number('Current progress (currentIndex)', 1)}>
currentIndex={number('Current progress (currentIndex)', 1)}
spaceEqually={boolean('Space Equally', false)}>
<ProgressStep
label={text('Label', 'First step')}
description="Step 1: Getting started with Carbon Design System"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ export class ProgressIndicator extends Component {
* Determines whether or not the ProgressIndicator should be rendered vertically.
*/
vertical: PropTypes.bool,
/**
* Specify whether the progress steps should be split equally in size in the div
*/
spaceEqually: PropTypes.bool,
};

static defaultProps = {
Expand Down Expand Up @@ -285,10 +289,17 @@ export class ProgressIndicator extends Component {
};

render() {
const { className, currentIndex, vertical, ...other } = this.props; // eslint-disable-line no-unused-vars
const {
className,
currentIndex, // eslint-disable-line no-unused-vars
vertical,
spaceEqually,
...other
} = this.props;
const classes = classnames({
[`${prefix}--progress`]: true,
[`${prefix}--progress--vertical`]: vertical,
[`${prefix}--progress--space-equal`]: spaceEqually && !vertical,
[className]: className,
});
return (
Expand Down

0 comments on commit f3a9e28

Please sign in to comment.