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.
feat(tabs): Added option for minimal animation (angular#2706)
- Loading branch information
1 parent
48dda50
commit 22ebef2
Showing
10 changed files
with
311 additions
and
7 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
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,6 +1,17 @@ | ||
<div class="mat-tab-body-content" #content | ||
[@translateTab]="_position" | ||
(@translateTab.start)="_onTranslateTabStarted($event)" | ||
(@translateTab.done)="_onTranslateTabComplete($event)"> | ||
<ng-template matTabBodyHost></ng-template> | ||
</div> | ||
<div *ngIf="_minimalAnimation;then min else full" class="mat-tab-body-content" #content></div> | ||
|
||
<ng-template #min> | ||
<div [@translateTabMinimalAnimation]="_position" | ||
(@translateTabMinimalAnimation.start)="_onTranslateTabStarted($event)" | ||
(@translateTabMinimalAnimation.done)="_onTranslateTabComplete($event)"> | ||
<ng-template matTabBodyHost></ng-template> | ||
</div> | ||
</ng-template> | ||
|
||
<ng-template #full> | ||
<div [@translateTab]="_position" | ||
(@translateTab.start)="_onTranslateTabStarted($event)" | ||
(@translateTab.done)="_onTranslateTabComplete($event)"> | ||
<ng-template matTabBodyHost></ng-template> | ||
</div> | ||
</ng-template> |
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
1 change: 1 addition & 0 deletions
1
src/material-examples/tab-group-minimal-animation/tab-group-minimal-animation-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 @@ | ||
/** No CSS for this example */ |
5 changes: 5 additions & 0 deletions
5
src/material-examples/tab-group-minimal-animation/tab-group-minimal-animation-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,5 @@ | ||
<mat-tab-group [minimalAnimation]="true"> | ||
<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> |
11 changes: 11 additions & 0 deletions
11
src/material-examples/tab-group-minimal-animation/tab-group-minimal-animation-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,11 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
/** | ||
* @title Basic use of the no animation selector | ||
*/ | ||
@Component({ | ||
selector: 'tab-group-minimal-animation-example', | ||
templateUrl: 'tab-group-minimal-animation-example.html', | ||
styleUrls: ['tab-group-minimal-animation-example.css'], | ||
}) | ||
export class TabGroupMinimalAnimationExample {} |