delete playlist modal

This commit is contained in:
2025-09-02 16:47:32 +02:00
parent 364dca526b
commit 88cb5fcdfb
2 changed files with 47 additions and 35 deletions
+17 -4
View File
@@ -7,11 +7,24 @@ import GradientButton from "../GradientButton";
import { FONT_FAMILY } from "../../styles/Fonts";
import AppActionSheet from "../AppActionSheet";
const DeleteModal = () => {
const DeleteModal = ({ payload }) => {
const {
title = "Supprimer ma playlist",
message = "Es-tu sur de vouloir supprimer ta playlist?",
onConfirm,
} = payload || {};
const onClose = () => {
SheetManager.hide("Delete");
};
const handleConfirm = async () => {
if (onConfirm) {
await onConfirm();
}
onClose();
};
return (
<AppActionSheet id="Delete">
<View style={{ gap: 20 }}>
@@ -24,7 +37,7 @@ const DeleteModal = () => {
textAlign: "center",
}}
>
Supprimer ma playlist
{title}
</Text>
<Text
style={{
@@ -34,11 +47,11 @@ const DeleteModal = () => {
textAlign: "center",
}}
>
Es-tu sur de vouloir supprimer ta playlist?
{message}
</Text>
</View>
<View style={{ width: "80%", alignSelf: "center", gap: 12 }}>
<BorderGradientButton title="Oui, supprimer" onPress={onClose} />
<BorderGradientButton title="Oui, supprimer" onPress={handleConfirm} />
<GradientButton title="Non, annuler" onPress={onClose} />
</View>
</View>