Skip to content

feat(mat-icon): Create an injection token for setting icon-defaults #23548

Closed
@yusijs

Description

@yusijs

Feature Description

I would like to have an injection token, allowing me to easily override the default fontSet without using the MatIconRegistry service.

Use Case

My particular use case right now is for storybook, where I would now need to create a wrapper around all components and call the registry-service. Being able to just { provide: MAT_ICON_OPTIONS, useValue: { color: 'primary', fontSet: 'material-icons-outlined' } would be timesaving.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/iconfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions