Inline
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
import DeleteOutlinedIcon from "@mui/icons-material/DeleteOutlined";
|
||||
import { IconButton, Tooltip } from "@mui/material";
|
||||
import { t } from "i18next";
|
||||
import { CollectionActions } from "..";
|
||||
|
||||
interface Iprops {
|
||||
handleCollectionAction: (
|
||||
action: CollectionActions,
|
||||
loader?: boolean,
|
||||
) => (...args: any[]) => Promise<void>;
|
||||
}
|
||||
|
||||
export function EmptyTrashQuickOption({ handleCollectionAction }: Iprops) {
|
||||
return (
|
||||
<Tooltip title={t("EMPTY_TRASH")}>
|
||||
<IconButton
|
||||
onClick={handleCollectionAction(
|
||||
CollectionActions.CONFIRM_EMPTY_TRASH,
|
||||
false,
|
||||
)}
|
||||
>
|
||||
<DeleteOutlinedIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
import { FlexWrapper } from "@ente/shared/components/Container";
|
||||
import EnteSpinner from "@ente/shared/components/EnteSpinner";
|
||||
import DeleteOutlinedIcon from "@mui/icons-material/DeleteOutlined";
|
||||
import PeopleIcon from "@mui/icons-material/People";
|
||||
import { IconButton, Tooltip } from "@mui/material";
|
||||
import { t } from "i18next";
|
||||
import { CollectionSummaryType } from "types/collection";
|
||||
import { CollectionActions } from "..";
|
||||
import { DownloadQuickOption } from "./DownloadQuickOption";
|
||||
import { EmptyTrashQuickOption } from "./EmptyTrashQuickOption";
|
||||
|
||||
interface QuickOptionsProps {
|
||||
handleCollectionAction: (
|
||||
@@ -52,6 +52,28 @@ const showEmptyTrashQuickOption = (type: CollectionSummaryType) => {
|
||||
return type === CollectionSummaryType.trash;
|
||||
};
|
||||
|
||||
interface EmptyTrashQuickOptionProps {
|
||||
handleCollectionAction: (
|
||||
action: CollectionActions,
|
||||
loader?: boolean,
|
||||
) => (...args: any[]) => Promise<void>;
|
||||
}
|
||||
|
||||
export const EmptyTrashQuickOption: React.FC<EmptyTrashQuickOptionProps> = ({
|
||||
handleCollectionAction,
|
||||
}) => (
|
||||
<Tooltip title={t("EMPTY_TRASH")}>
|
||||
<IconButton
|
||||
onClick={handleCollectionAction(
|
||||
CollectionActions.CONFIRM_EMPTY_TRASH,
|
||||
false,
|
||||
)}
|
||||
>
|
||||
<DeleteOutlinedIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
);
|
||||
|
||||
const showDownloadQuickOption = (type: CollectionSummaryType) => {
|
||||
return (
|
||||
type === CollectionSummaryType.folder ||
|
||||
|
||||
Reference in New Issue
Block a user