Skip to content

Commit c15c5cd

Browse files
authored
Merge branch 'master' into tile-group-accessibility
2 parents 146566c + d28495c commit c15c5cd

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

src/progress-indicator/progress-indicator.component.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { Step } from "./progress-indicator-step.interface";
2828
class="bx--progress-step bx--progress-step--{{step.state[0]}}"
2929
*ngFor="let step of steps; let i = index"
3030
[ngClass]="{'bx--progress-step--disabled' : step.disabled}">
31-
<div class="bx--progress-step-button bx--progress-step-button--unclickable" role="button" tabindex="-1">
31+
<button class="bx--progress-step-button bx--progress-step-button--unclickable" role="button" tabindex="-1">
3232
<ng-container *ngIf="!step.state.includes('error')">
3333
<svg ibmIcon="checkmark--outline" size="16" *ngIf="step.state.includes('complete')"></svg>
3434
<svg ibmIcon="incomplete" size="16" *ngIf="step.state.includes('current')"></svg>
@@ -48,10 +48,12 @@ import { Step } from "./progress-indicator-step.interface";
4848
(click)="stepSelected.emit({ step: step, index: i })">
4949
{{step.text}}
5050
</p>
51-
<p class="bx--progress-label" *ngIf="!step.tooltip" (click)="stepSelected.emit({ step: step, index: i })">{{step.text}}</p>
52-
<p *ngIf="step.optionalText" class="bx--progress-optional">{{step.optionalText}}</p>
51+
<div class="bx--progress-text" *ngIf="!step.tooltip || step.optionalText">
52+
<p class="bx--progress-label" *ngIf="!step.tooltip" (click)="stepSelected.emit({ step: step, index: i })">{{step.text}}</p>
53+
<p *ngIf="step.optionalText" class="bx--progress-optional">{{step.optionalText}}</p>
54+
</div>
5355
<span class="bx--progress-line"></span>
54-
</div>
56+
</button>
5557
</li>
5658
</ul>
5759
`

src/progress-indicator/progress-indicator.stories.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,25 @@ storiesOf("Components|Progress Indicator", module)
120120
steps : [
121121
{
122122
text: "First step",
123-
state: ["complete"]
123+
state: ["complete"],
124+
optionalText: "optional"
124125
},
125126
{
126127
text: "Second step",
127-
state: ["current"]
128+
state: ["current"],
129+
tooltip: { content: "Overflow tooltip content.", trigger: "click", placement: "bottom" }
128130
},
129131
{
130132
text: "Third step",
131-
state: ["incomplete"]
133+
state: ["incomplete"],
134+
tooltip: {
135+
content: `Lorem ipsum dolor, sit amet consectetur adipisicing elit.
136+
Animi consequuntur hic ratione aliquid cupiditate, nesciunt saepe iste
137+
blanditiis cumque maxime tenetur veniam est illo deserunt sint quae pariatur.
138+
Laboriosam, consequatur.`,
139+
trigger: "click",
140+
placement: "bottom"
141+
}
132142
},
133143
{
134144
text: "Fourth step",

0 commit comments

Comments
 (0)