Update carousels, card hover, and IranBay branding.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
"use client";
|
||||
|
||||
import styles from "@/components/BusinessDetailsPage.module.css";
|
||||
|
||||
export type CatalogControlsMode = "edit-remove" | "manage";
|
||||
|
||||
export default function CatalogCardControls({
|
||||
mode = "edit-remove",
|
||||
onEdit,
|
||||
onRemove,
|
||||
onManage,
|
||||
busy,
|
||||
}: {
|
||||
mode?: CatalogControlsMode;
|
||||
onEdit?: () => void;
|
||||
onRemove?: () => void;
|
||||
onManage?: () => void;
|
||||
busy?: boolean;
|
||||
}) {
|
||||
if (mode === "manage") {
|
||||
return (
|
||||
<div className={styles.cardControls}>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.cardControl}
|
||||
disabled={busy}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
onManage?.();
|
||||
}}
|
||||
>
|
||||
Manage business
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.cardControls}>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.cardControl}
|
||||
disabled={busy}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
onEdit?.();
|
||||
}}
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className={`${styles.cardControl} ${styles.cardControlDanger}`}
|
||||
disabled={busy}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
onRemove?.();
|
||||
}}
|
||||
>
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user