File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
tools/public_api_guard/material Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ export interface MatTabGroupBaseHeader {
6969/** Possible positions for the tab header. */
7070export type MatTabHeaderPosition = 'above' | 'below' ;
7171
72+ /** Boolean constant that determines whether the tab group supports the `backgroundColor` input */
73+ const ENABLE_BACKGROUND_INPUT = true ;
74+
7275/**
7376 * Material design tab-group component. Supports basic tab pairs (label + content) and includes
7477 * animated ink-bar, keyboard navigation, and screen reader.
@@ -236,13 +239,21 @@ export class MatTabGroup
236239
237240 private _preserveContent : boolean = false ;
238241
239- /** Background color of the tab group. */
242+ /**
243+ * Background color of the tab group.
244+ * @deprecated The background color should be customized through Sass theming APIs.
245+ * @breaking -change 20.0.0 Remove this input
246+ */
240247 @Input ( )
241248 get backgroundColor ( ) : ThemePalette {
242249 return this . _backgroundColor ;
243250 }
244251
245252 set backgroundColor ( value : ThemePalette ) {
253+ if ( ! ENABLE_BACKGROUND_INPUT ) {
254+ throw new Error ( `mat-tab-group background color must be set through the Sass theming API` ) ;
255+ }
256+
246257 const classList : DOMTokenList = this . _elementRef . nativeElement . classList ;
247258
248259 classList . remove ( 'mat-tabs-with-background' , `mat-background-${ this . backgroundColor } ` ) ;
Original file line number Diff line number Diff line change @@ -266,6 +266,7 @@ export class MatTabGroup extends _MatTabGroupMixinBase implements AfterContentIn
266266 set animationDuration(value : NumberInput );
267267 // (undocumented)
268268 _animationMode? : string | undefined ;
269+ // @deprecated
269270 get backgroundColor(): ThemePalette ;
270271 set backgroundColor(value : ThemePalette );
271272 get contentTabIndex(): number | null ;
You can’t perform that action at this time.
0 commit comments