Skip to content

Commit f7a7289

Browse files
authored
docs(material/tabs): Update description and examples for color input description on API page (#29336)
1 parent caeb3e8 commit f7a7289

File tree

10 files changed

+21
-64
lines changed

10 files changed

+21
-64
lines changed

src/components-examples/material/tabs/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export {TabGroupHeaderBelowExample} from './tab-group-header-below/tab-group-hea
1010
export {TabGroupLazyLoadedExample} from './tab-group-lazy-loaded/tab-group-lazy-loaded-example';
1111
export {TabGroupPreserveContentExample} from './tab-group-preserve-content/tab-group-preserve-content-example';
1212
export {TabGroupStretchedExample} from './tab-group-stretched/tab-group-stretched-example';
13-
export {TabGroupThemeExample} from './tab-group-theme/tab-group-theme-example';
1413
export {TabNavBarBasicExample} from './tab-nav-bar-basic/tab-nav-bar-basic-example';
1514
export {TabGroupPaginatedExample} from './tab-group-paginated/tab-group-paginated-example';
1615
export {TabGroupInvertedExample} from './tab-group-inverted/tab-group-inverted-example';

src/components-examples/material/tabs/tab-group-theme/tab-group-theme-example.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/components-examples/material/tabs/tab-group-theme/tab-group-theme-example.html

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/components-examples/material/tabs/tab-group-theme/tab-group-theme-example.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- #docregion mat-tab-nav -->
2-
<nav mat-tab-nav-bar [backgroundColor]="background" [tabPanel]="tabPanel">
2+
<nav mat-tab-nav-bar [tabPanel]="tabPanel">
33
@for (link of links; track link) {
44
<a mat-tab-link
55
(click)="activeLink = link"
@@ -10,9 +10,6 @@
1010
<mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>
1111
<!-- #enddocregion mat-tab-nav -->
1212

13-
<button mat-raised-button class="example-action-button" (click)="toggleBackground()">
14-
Toggle background
15-
</button>
1613
<button mat-raised-button class="example-action-button" (click)="addLink()">
1714
Add link
1815
</button>

src/components-examples/material/tabs/tab-nav-bar-basic/tab-nav-bar-basic-example.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {Component} from '@angular/core';
2-
import {ThemePalette} from '@angular/material/core';
32
import {MatButtonModule} from '@angular/material/button';
43
import {MatTabsModule} from '@angular/material/tabs';
54

@@ -16,11 +15,6 @@ import {MatTabsModule} from '@angular/material/tabs';
1615
export class TabNavBarBasicExample {
1716
links = ['First', 'Second', 'Third'];
1817
activeLink = this.links[0];
19-
background: ThemePalette = undefined;
20-
21-
toggleBackground() {
22-
this.background = this.background ? undefined : 'primary';
23-
}
2418

2519
addLink() {
2620
this.links.push(`Link ${this.links.length + 1}`);

src/dev-app/tabs/tabs-demo.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ <h3>Tab group with lazy loaded content</h3>
1616
<tab-group-lazy-loaded-example></tab-group-lazy-loaded-example>
1717
<h3>Tab group stretched</h3>
1818
<tab-group-stretched-example></tab-group-stretched-example>
19-
<h3>Tab group theming</h3>
20-
<tab-group-theme-example></tab-group-theme-example>
2119
<h3>Tab navigation bar basic</h3>
2220
<tab-nav-bar-basic-example></tab-nav-bar-basic-example>
2321
<h3>Paginated Tabs</h3>

src/dev-app/tabs/tabs-demo.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
TabGroupPaginatedExample,
2323
TabGroupPreserveContentExample,
2424
TabGroupStretchedExample,
25-
TabGroupThemeExample,
2625
TabNavBarBasicExample,
2726
} from '@angular/components-examples/material/tabs';
2827
import {ChangeDetectionStrategy, Component} from '@angular/core';
@@ -37,7 +36,6 @@ import {MatTabsModule} from '@angular/material/tabs';
3736
TabGroupInvertedExample,
3837
TabGroupPaginatedExample,
3938
TabNavBarBasicExample,
40-
TabGroupThemeExample,
4139
TabGroupStretchedExample,
4240
TabGroupPreserveContentExample,
4341
TabGroupLazyLoadedExample,

src/material/tabs/tab-group.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,13 @@ export class MatTabGroup implements AfterContentInit, AfterContentChecked, OnDes
120120
/** Subscription to changes in the tab labels. */
121121
private _tabLabelSubscription = Subscription.EMPTY;
122122

123-
/** Theme color of the tab group. */
123+
/**
124+
* Theme color of the tab group. This API is supported in M2 themes only, it
125+
* has no effect in M3 themes.
126+
*
127+
* For information on applying color variants in M3, see
128+
* https://material.angular.io/guide/theming#using-component-color-variants.
129+
*/
124130
@Input()
125131
color: ThemePalette;
126132

@@ -204,7 +210,12 @@ export class MatTabGroup implements AfterContentInit, AfterContentChecked, OnDes
204210
preserveContent: boolean = false;
205211

206212
/**
207-
* Background color of the tab group.
213+
* Theme color of the background of the tab group. This API is supported in M2 themes only, it
214+
* has no effect in M3 themes.
215+
*
216+
* For information on applying color variants in M3, see
217+
* https://material.angular.io/guide/theming#using-component-color-variants.
218+
*
208219
* @deprecated The background color should be customized through Sass theming APIs.
209220
* @breaking-change 20.0.0 Remove this input
210221
*/

src/material/tabs/tab-nav-bar/tab-nav-bar.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,13 @@ export class MatTabNav
112112
/** Query list of all tab links of the tab navigation. */
113113
@ContentChildren(forwardRef(() => MatTabLink), {descendants: true}) _items: QueryList<MatTabLink>;
114114

115-
/** Background color of the tab nav. */
115+
/**
116+
* Theme color of the background of the tab nav. This API is supported in M2 themes only, it
117+
* has no effect in M3 themes.
118+
*
119+
* For information on applying color variants in M3, see
120+
* https://material.angular.io/guide/theming#using-component-color-variants.
121+
*/
116122
@Input()
117123
get backgroundColor(): ThemePalette {
118124
return this._backgroundColor;

0 commit comments

Comments
 (0)