forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(material/tabs): add dynamically aligned tabs group example
adds an example for dynamically aligned tabs group closes angular#29029
- Loading branch information
Showing
5 changed files
with
24 additions
and
19 deletions.
There are no files selected for viewing
6 changes: 4 additions & 2 deletions
6
src/components-examples/material/tabs/tab-group-align/tab-group-align-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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.mat-tab-group { | ||
margin-bottom: 48px; | ||
.example-action-button { | ||
margin-top: 8px; | ||
margin-bottom: 8px; | ||
margin-right: 8px; | ||
} |
26 changes: 13 additions & 13 deletions
26
src/components-examples/material/tabs/tab-group-align/tab-group-align-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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<!-- #docregion align-start --> | ||
<mat-tab-group mat-stretch-tabs="false" mat-align-tabs="start"> | ||
<!-- #enddocregion align-start --> | ||
<mat-tab label="First">Content 1</mat-tab> | ||
<mat-tab label="Second">Content 2</mat-tab> | ||
<mat-tab label="Third">Content 3</mat-tab> | ||
</mat-tab-group> | ||
<button mat-raised-button class="example-action-button" (click)="alignment = 'start'"> | ||
Start | ||
</button> | ||
|
||
<mat-tab-group mat-stretch-tabs="false" mat-align-tabs="center"> | ||
<mat-tab label="First">Content 1</mat-tab> | ||
<mat-tab label="Second">Content 2</mat-tab> | ||
<mat-tab label="Third">Content 3</mat-tab> | ||
</mat-tab-group> | ||
<button mat-raised-button class="example-action-button" (click)="alignment = 'center'"> | ||
Center | ||
</button> | ||
|
||
<mat-tab-group mat-stretch-tabs="false" mat-align-tabs="end"> | ||
<button mat-raised-button class="example-action-button" (click)="alignment = 'end'"> | ||
End | ||
</button> | ||
|
||
<!-- #docregion align-start --> | ||
<mat-tab-group mat-stretch-tabs="false" [mat-align-tabs]="alignment"> | ||
<mat-tab label="First">Content 1</mat-tab> | ||
<mat-tab label="Second">Content 2</mat-tab> | ||
<mat-tab label="Third">Content 3</mat-tab> | ||
</mat-tab-group> | ||
<!-- #docregion align-end --> |
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