material-components / material-components-web

Modular and customizable Material Design UI components for the web
https://material.io/develop/web
MIT License
17.12k stars 2.15k forks source link

[mdc-icon-button] unable to import core-styles mixin of icon-button as shown in documentation #8088

Open iKrishnaSahu opened 1 year ago

iKrishnaSahu commented 1 year ago

Bug report

unable to import core-styles mixin of icon-button as shown in documentation - https://m2.material.io/develop/web/components/buttons/icon-buttons

// fails
@use '@material/icon-button' as icon-button;

// works
// @use '@material/icon-button/icon-button' as icon-button;

@include icon-button.core-styles;

Steps to reproduce

  1. Open this stackblitz
  2. Check if angular app is building

Actual behavior

Style import should work as shown in the documentation

Expected behavior

Style import is not working as shown in the documentation

Screenshots

image

Your Environment:

Software Version(s)
MDC Web Latest
Browser Chrome
Operating System Windows

Additional context

This seems like a miss in exporting styles file from barrel file.

Possible solution

Exporting _icon-button.scss from barrel file (_index.scss) should fix this issue