mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
feat(tabs): md-stretch-tabs (#1909)
Stretch tabs grow until they fill the tab group width. Closes #1353
This commit is contained in:
committed by
tinayuangao
parent
bc6cf6edee
commit
78464a20bf
@@ -97,6 +97,15 @@
|
||||
</md-tab>
|
||||
</md-tab-group>
|
||||
|
||||
<h1>Stretched Tabs</h1>
|
||||
|
||||
<md-tab-group class="demo-tab-group" style="height: 200px" md-stretch-tabs>
|
||||
<md-tab *ngFor="let tab of tabs" [disabled]="tab.disabled">
|
||||
<template md-tab-label>{{tab.label}}</template>
|
||||
{{tab.content}}
|
||||
</md-tab>
|
||||
</md-tab-group>
|
||||
|
||||
|
||||
<h1>Async Tabs</h1>
|
||||
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host[md-stretch-tabs] .md-tab-label {
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
// The ink bar that displays next to the active tab
|
||||
md-ink-bar {
|
||||
@include ink-bar;
|
||||
|
||||
Reference in New Issue
Block a user