Skip to content

Commit 69316b8

Browse files
committed
fix(material/button): remove deprecated factory functions
Removes factory functions that we had marked as deprecated for v21. These functions aren't necessary since we switched to standalone. BREAKING CHANGE: * `MAT_FAB_DEFAULT_OPTIONS_FACTORY` has been removed.
1 parent 255df78 commit 69316b8

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

goldens/material/button/index.api.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ export const MAT_BUTTON_CONFIG: InjectionToken<MatButtonConfig>;
2020
// @public
2121
export const MAT_FAB_DEFAULT_OPTIONS: InjectionToken<MatFabDefaultOptions>;
2222

23-
// @public @deprecated
24-
export function MAT_FAB_DEFAULT_OPTIONS_FACTORY(): MatFabDefaultOptions;
25-
2623
// @public
2724
export const MatAnchor: typeof MatButton;
2825

src/material/button/fab.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,15 @@ export const MAT_FAB_DEFAULT_OPTIONS = new InjectionToken<MatFabDefaultOptions>(
3636
'mat-mdc-fab-default-options',
3737
{
3838
providedIn: 'root',
39-
factory: MAT_FAB_DEFAULT_OPTIONS_FACTORY,
39+
factory: () => defaults,
4040
},
4141
);
4242

43-
/**
44-
* @docs-private
45-
* @deprecated No longer used, will be removed.
46-
* @breaking-change 21.0.0
47-
*/
48-
export function MAT_FAB_DEFAULT_OPTIONS_FACTORY(): MatFabDefaultOptions {
49-
return {
50-
// The FAB by default has its color set to accent.
51-
color: 'accent',
52-
};
53-
}
54-
5543
// Default FAB configuration.
56-
const defaults = MAT_FAB_DEFAULT_OPTIONS_FACTORY();
44+
const defaults: MatFabDefaultOptions = {
45+
// The FAB by default has its color set to accent.
46+
color: 'accent',
47+
};
5748

5849
/**
5950
* Material Design floating action button (FAB) component. These buttons represent the primary

0 commit comments

Comments
 (0)