mirror of
https://github.com/SomboChea/ui
synced 2026-01-17 16:45:49 +07:00
feat(lng): Added change language on the fly (#456)
* feat(lng): added change language on the fly * fixed dropdown * applied feedbacks * added translation * updated bundlesize * fixed error * updated snaps * added french language * added language in storage * updated styles * fixed tests
This commit is contained in:
committed by
GitHub
parent
b17368470d
commit
675ee980ee
@@ -9,10 +9,10 @@ interface Props extends Omit<MenuItemProps, 'component'> {
|
||||
component?: HTMLElementTagName;
|
||||
}
|
||||
|
||||
const MenuItem = forwardRef<MenuItemRef, Props>(function MenuItem({ button, ...props }, ref) {
|
||||
const MenuItem = forwardRef<MenuItemRef, Props>(function MenuItem(props, ref) {
|
||||
// it seems typescript has some discrimination type limitions. Please see: https://github.com/mui-org/material-ui/issues/14971
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
return <StyledMaterialUIMenuItem {...props} button={button as any} innerRef={ref} />;
|
||||
// @ts-ignore Type Types of property 'button' are incompatible.
|
||||
return <StyledMaterialUIMenuItem {...props} ref={ref as any} />;
|
||||
});
|
||||
|
||||
MenuItem.defaultProps = {
|
||||
@@ -20,7 +20,6 @@ MenuItem.defaultProps = {
|
||||
};
|
||||
|
||||
export default MenuItem;
|
||||
|
||||
const StyledMaterialUIMenuItem = styled(MaterialUIMenuItem)({
|
||||
outline: 'none',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user