MatBlazor icon indicating copy to clipboard operation
MatBlazor copied to clipboard

More easily Change Icon on Accordion

Open Tailslide opened this issue 4 years ago • 0 comments

Describe the feature request Right now you can hide the expansion icon with something like this and add your own:

.mat-expansion-panel span.after.material-icon {
    display: none;
}

However, it would be nice to be able to specify an icon through an attribute instead like the react material-ui accordion's 'expandIcon' attribute

https://material-ui.com/api/expansion-panel-summary/

Also, if it could animate-rotate the icon upside down when open like the react control that would be cool too:

    /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */
    expandIcon: {
      transform: 'rotate(0deg)',
      transition: theme.transitions.create('transform', transition),
      '&:hover': {
        // Disable the hover effect for the IconButton,
        // because a hover effect should apply to the entire Expand button and
        // not only to the IconButton.
        backgroundColor: 'transparent',
      },
      '&$expanded': {
        transform: 'rotate(180deg)',
      },
    },

Tailslide avatar Mar 23 '21 20:03 Tailslide