Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Symmetric API for the Angular Material Icon Button #8105

Closed
@fireflysemantics

Description

For all the buttons in Angular Material we can delegate to the helper mixins in MCW, except for the icon button.

It has a helper function, but the API is not symmetric with respect to the API offered for the other button types. Created a separate issue for this within the Angular Material repository that elaborates further..

Ideally we would be able to delegate to @material/icon-button/icon-button-theme for color extension mixins like this one:

/**
 * The MDC API is not symmetric with respect to the other button theme helper mixins
 */
//@use '@material/icon-button/icon-button-theme' as mdc-icon-button-theme;
@use './el-x-icon-button-theme' as el-x-icon-button-theme; 
@use '../common/' as *;

@mixin icon-variant($color-class, $color) {
  &.#{ $color-class } {
    @include el-x-icon-button-theme.theme((
      icon-color: $color
    ));
    color: var(--mdc-icon-button-icon-color);
    @include ripple-color($color);
  }
}

Metadata

Assignees

No one assigned

    Labels

    Unresolved (Archived)Open and unresolved issues and PRs that were closed due to archiving the repository.feature-request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions