-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(material/tabs): Refactor MatTabNav to follow the ARIA tabs patte…
…rn (#24062) by introducing a new tabpanel component.
- Loading branch information
Showing
23 changed files
with
618 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...mponents-examples/material/tabs/tab-nav-bar-with-panel/tab-nav-bar-with-panel-example.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.example-action-button { | ||
margin-top: 8px; | ||
margin-right: 8px; | ||
} |
9 changes: 9 additions & 0 deletions
9
...ponents-examples/material/tabs/tab-nav-bar-with-panel/tab-nav-bar-with-panel-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- #docregion mat-tab-nav --> | ||
<nav mat-tab-nav-bar [tabPanel]="tabPanel"> | ||
<a mat-tab-link *ngFor="let link of links" | ||
(click)="activeLink = link" | ||
[active]="activeLink == link"> {{link}} </a> | ||
<a mat-tab-link disabled>Disabled Link</a> | ||
</nav> | ||
<mat-tab-nav-panel #tabPanel></mat-tab-nav-panel> | ||
<!-- #enddocregion mat-tab-nav --> |
14 changes: 14 additions & 0 deletions
14
...omponents-examples/material/tabs/tab-nav-bar-with-panel/tab-nav-bar-with-panel-example.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
/** | ||
* @title Use of the tab nav bar with the dedicated panel component. | ||
*/ | ||
@Component({ | ||
selector: 'tab-nav-bar-with-panel-example', | ||
templateUrl: 'tab-nav-bar-with-panel-example.html', | ||
styleUrls: ['tab-nav-bar-with-panel-example.css'], | ||
}) | ||
export class TabNavBarWithPanelExample { | ||
links = ['First', 'Second', 'Third']; | ||
activeLink = this.links[0]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.