Fix/manga migration opening search twice (#586)

* Update "MenuItem" props

* Navigate to manga migration only once

* Remove disabling migrate button on manga refresh

too much copy&paste
This commit is contained in:
schroda
2024-01-29 20:54:56 +01:00
committed by GitHub
parent 10ec7de628
commit 891d6f4165
4 changed files with 17 additions and 29 deletions

View File

@@ -6,19 +6,17 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { ListItemIcon, ListItemText, MenuItem as MuiMenuItem } from '@mui/material';
import { ListItemIcon, ListItemText, MenuItem as MuiMenuItem, MenuItemProps } from '@mui/material';
import { OverridableComponent } from '@mui/material/OverridableComponent';
import { SvgIconTypeMap } from '@mui/material/SvgIcon/SvgIcon';
interface IProps {
interface IProps extends MenuItemProps {
title: string;
Icon: OverridableComponent<SvgIconTypeMap> & { muiName: string };
onClick: () => void;
isDisabled?: boolean;
}
export const MenuItem = ({ onClick, title, Icon, isDisabled }: IProps) => (
<MuiMenuItem onClick={onClick} disabled={isDisabled}>
export const MenuItem = ({ title, Icon, ...menuItemProps }: IProps) => (
<MuiMenuItem {...menuItemProps}>
<ListItemIcon>
<Icon fontSize="small" />
</ListItemIcon>