mirror of
https://github.com/ente-io/ente.git
synced 2025-08-05 14:17:10 +00:00
Remove unused variant
This commit is contained in:
parent
fca6f36087
commit
8c01c7a902
@ -1,6 +1,5 @@
|
||||
import { EnteSwitch } from "@/base/components/EnteSwitch";
|
||||
import { CaptionedText } from "@ente/shared/components/CaptionedText";
|
||||
import ChangeDirectoryOption from "@ente/shared/components/ChangeDirectoryOption";
|
||||
import {
|
||||
SpaceBetweenFlex,
|
||||
VerticallyCenteredFlex,
|
||||
@ -17,13 +16,7 @@ import React from "react";
|
||||
interface EnteMenuItemProps {
|
||||
onClick: () => void;
|
||||
color?: ButtonProps["color"];
|
||||
variant?:
|
||||
| "primary"
|
||||
| "captioned"
|
||||
| "toggle"
|
||||
| "secondary"
|
||||
| "mini"
|
||||
| "path";
|
||||
variant?: "primary" | "captioned" | "toggle" | "secondary" | "mini";
|
||||
fontWeight?: TypographyProps["fontWeight"];
|
||||
startIcon?: React.ReactNode;
|
||||
endIcon?: React.ReactNode;
|
||||
@ -54,14 +47,14 @@ export const EnteMenuItem: React.FC<EnteMenuItemProps> = ({
|
||||
disabled = false,
|
||||
}) => {
|
||||
const handleButtonClick = () => {
|
||||
if (variant === "path" || variant === "toggle") {
|
||||
if (variant === "toggle") {
|
||||
return;
|
||||
}
|
||||
onClick();
|
||||
};
|
||||
|
||||
const handleIconClick = () => {
|
||||
if (variant !== "path" && variant !== "toggle") {
|
||||
if (variant !== "toggle") {
|
||||
return;
|
||||
}
|
||||
onClick();
|
||||
@ -126,9 +119,6 @@ export const EnteMenuItem: React.FC<EnteMenuItemProps> = ({
|
||||
onClick={handleIconClick}
|
||||
/>
|
||||
)}
|
||||
{variant === "path" && (
|
||||
<ChangeDirectoryOption onClick={handleIconClick} />
|
||||
)}
|
||||
</VerticallyCenteredFlex>
|
||||
</SpaceBetweenFlex>
|
||||
</MenuItem>
|
||||
|
Loading…
x
Reference in New Issue
Block a user