update dropdown-menu.tsx and action.tsx
This commit is contained in:
parent
100b44f024
commit
1cafed30e8
|
|
@ -213,12 +213,31 @@ const DropdownHamburgerBetter: React.FC<{
|
|||
<DropdownMenuSeparator />
|
||||
<DropdownMenuGroup>
|
||||
{list.map((e, idx) => {
|
||||
if (typeof e?.children === "function") {
|
||||
return (
|
||||
<DropdownMenuItem
|
||||
key={"menu-group-" + idx}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
}}
|
||||
className={cn(
|
||||
"cursor-pointer hover:bg-gray-100 rounded-md",
|
||||
e?.className ? e?.className : ""
|
||||
)}
|
||||
>
|
||||
{e.children()}
|
||||
</DropdownMenuItem>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<DropdownMenuItem
|
||||
key={"menu-group-" + idx}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
if (!e?.progration) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
if (typeof e?.onClick === "function") {
|
||||
e?.onClick();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export const actionToast = async (data: {
|
|||
>
|
||||
<div className="flex text-green-700 items-center success-title font-semibold">
|
||||
<Check className="h-6 w-6 mr-1 " />
|
||||
{msg_succes ? msg_succes : "Success"}
|
||||
{msg_succes ? msg_succes : " Success"}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
@ -63,7 +63,7 @@ export const actionToast = async (data: {
|
|||
<div className="flex flex-col w-full">
|
||||
<div className="flex text-red-600 items-center">
|
||||
<AlertTriangle className="h-4 w-4 mr-1" />
|
||||
{msg_error ? msg_error : "Failed"}{" "}
|
||||
{msg_error ? msg_error : " Failed"}{" "}
|
||||
{get(ex, "response.data.meta.message") || ex.message}.
|
||||
</div>
|
||||
</div>,
|
||||
|
|
|
|||
Loading…
Reference in New Issue