Skip to content

Commit

Permalink
Merge pull request #392 from werdnanoslen/progress-indicator--vertical
Browse files Browse the repository at this point in the history
feat(progress-indicator): adds 'vertical' variant
  • Loading branch information
cal-smith committed Feb 13, 2019
2 parents 1a4316f + b956df5 commit b82c630
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 14 deletions.
43 changes: 32 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -66,7 +66,7 @@
"core-js": "^2.5.3",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26",
"carbon-components": "^9.20.0"
"carbon-components": "^9.70.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.7.1",
Expand Down
5 changes: 3 additions & 2 deletions src/progress-indicator/progress-indicator.component.ts
Expand Up @@ -9,7 +9,8 @@ import { ExperimentalService } from "./../experimental.module";
data-progress-current
class="bx--progress"
[ngClass]="{
'bx--skeleton': skeleton
'bx--skeleton': skeleton,
'bx--progress--vertical': (orientation === 'vertical')
}">
<li
class="bx--progress-step bx--progress-step--{{step.state}}"
Expand Down Expand Up @@ -59,7 +60,7 @@ export class ProgressIndicator {
}

@Input() steps = [];

@Input() orientation: "horizontal" | "vertical" = "horizontal";
@Input() skeleton = false;

get isExperimental() {
Expand Down
34 changes: 34 additions & 0 deletions src/progress-indicator/progress-indicator.stories.ts
Expand Up @@ -82,4 +82,38 @@ storiesOf("ProgressIndicator", module)
<app-experimental-component></app-experimental-component>
<app-skeleton-progress-indicator></app-skeleton-progress-indicator>
`
}))
.add("Vertical", () => ({
template: `
<app-experimental-component></app-experimental-component>
<ibm-progress-indicator [orientation]="'vertical'" [steps]="steps"></ibm-progress-indicator>
`,
props: {
steps : [
{
text: "1. ONE",
state: ["complete"]
},
{
text: "2. TWO",
state: ["complete"]
},
{
text: "3. THREE",
state: ["current"]
},
{
text: "4. FOUR",
state: ["incomplete"]
},
{
text: "5. FIVE",
state: ["incomplete"]
},
{
text: "6. SIX",
state: ["incomplete"]
}
]
}
}));

0 comments on commit b82c630

Please sign in to comment.