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

feat(accordion): add key navigation to accordion #3993

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<accordion>
<accordion-group>
<div accordion-heading class="clearfix">
I can have markup!
<button class="btn btn-link btn-block clearfix" accordion-heading>
<div class="pull-left float-left">I can have markup!</div>
<span class="badge badge-secondary float-right pull-right">Some HTML here</span>
</div>
</button>
This is just some content to illustrate fancy headings.
</accordion-group>
<accordion-group>
<div accordion-heading>
<button class="btn btn-link" accordion-heading>
I can have markup, too!
</div>
</button>
<span class="badge badge-secondary center">And some HTML here</span>
</accordion-group>
</accordion>
4 changes: 2 additions & 2 deletions src/accordion/accordion-group.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<div class="panel-title">
<div role="button" class="accordion-toggle"
[attr.aria-expanded]="isOpen">
<div *ngIf="heading" [ngClass]="{'text-muted': isDisabled}">
<button class="btn btn-link" *ngIf="heading" [ngClass]="{'text-muted': isDisabled}">
{{ heading }}
</div>
</button>
<ng-content select="[accordion-heading]"></ng-content>
</div>
</div>
Expand Down