-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[system] Fix inconsistent multiple types for mergeBreakpointsInOrder
#38405
Comments
Hi @mnajdova, I'm happy to raise a PR for this, let me know :) |
@dylnic Thank you for bringing up this issue. You're absolutely right – the type definition should remain consistent, no matter where it's imported from. Please feel free to create a pull request to fix this. Additionally, would you be willing to share your specific use case for using this method? |
mergeBreakpointsInOrder
@ZeeshanTamboli - Can you assign this to me? |
@ZeeshanTamboli no worries :) We're leveraging mui in a component library and need to add responsive props to some of the custom components that don't use mui under the hood. |
@ZeeshanTamboli - Can you please add the system label or similar, so it doesn't break the pipeline? Cheers! |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/s/mui-mergebreakpointsinorder-type-83gd2y
Steps:
Current behavior 😯
The typing for the
mergeBreakpointsInOrder
changes depending on where you import it from. If you import from the barrel file it appears to use an old type incompatible with the current theme breakpoints. However the function is typed correctly if you use a path import.This works:
import { mergeBreakpointsInOrder } from "@mui/system/breakpoints";
This doesn't:
import { mergeBreakpointsInOrder } from "@mui/system";
Expected behavior 🤔
The same type should be used regardless of how you import the function.
Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: