mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.24k stars 32.11k forks source link

[RFC] Joy UI with material icons #35378

Open Miigaarino opened 1 year ago

Miigaarino commented 1 year ago

What's the problem? 🤔

To use material icons with Joy UI i must install @mui/material

The @mui/icons-material package depends on @mui/material, which requires Emotion packages. If you don't use Material UI in your project yet, install the icons package with: npm install @mui/icons-material @mui/material @emotion/styled @emotion/react.

But the whole purpose of using Joy UI for me is to not use @mui/material, so just to use the icons now i have 2 libraries with the same component:

image

Is this the right way to use material icons with Joy UI or should there be another solution?

What are the requirements? ❓

No response

What are our options? 💡

No response

Proposed solution 🟢

(maybe make material icons not depend on @mui/material)

Resources and benchmarks 🔗

No response

ZeeshanTamboli commented 1 year ago

I think this was tried in #30612 but was decided to revisit it later. For using material icons in Joy UI internally, PR #30681 was created. @siriwatknp Can you take a look?

siriwatknp commented 1 year ago

@Miigaarino Thanks for the feedback. I'm aware of this but sadly I don't have a good workaround.

However, Joy UI can be used with other icon libraries as well. Please follow the guide (unpublished) at https://github.com/mui/material-ui/pull/35377.

siriwatknp commented 1 year ago

Seems like there is a workaround if you don't plan to use Material UI with Joy UI by using yarn resolutions. Need https://github.com/mui/material-ui/pull/35404 to be merged first.