-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[pickers] Make the usePickersTranslations hook public
#13657
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
[pickers] Make the usePickersTranslations hook public
#13657
Conversation
|
Deploy preview: https://deploy-preview-13657--material-ui-x.netlify.app/ Updated pages: |
useLocaleText hook public
6ff30c7 to
77d9104
Compare
77d9104 to
cad0156
Compare
LukasTy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you for the effort! 👍 👏
|
P.S. In regards to accessing const useLocalization = () => {
return React.useContext(MuiPickersAdapterContext);
};
...
const { utils } = useLocalization(); |
But |
Well, it's exported 🤔 mui-x/scripts/x-date-pickers.exports.json Line 149 in 742a58a
|
|
😬 Should not be |
I'm all for it. 🙌 |
|
However, it seems that this export has already been added as per the user's request. 🙈 |
|
Totally forgot this 😆 I'll keep it for a follow up 👍 |
useLocaleText hook publicusePickersTranslations hook public
LukasTy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The final result looks great! 💯 💙
One final nitpick: https://github.com/mui/mui-x/issues/12049#issuecomment-1953915199—I've mentioned potentially creating a bit more varied changes to the custom ActionBar slot. 🤔
|
We can improve the ActionBar demo in a follow up, it's not strictly related to this change 👍 |
Closes #12691