añadido crd para Song y transladada la logica de /gallery a un controller
This commit is contained in:
46
resources/js/Components/ModalRemoveCancion.tsx
Normal file
46
resources/js/Components/ModalRemoveCancion.tsx
Normal file
@@ -0,0 +1,46 @@
|
||||
import { Cancion } from '@/types/types';
|
||||
import { FormEvent, useState } from 'react';
|
||||
import Checkbox from './Checkbox';
|
||||
import InputLabel from './InputLabel';
|
||||
import Modal from './Modal';
|
||||
import PrimaryButton from './PrimaryButton';
|
||||
|
||||
export default function ModalRemoveCancion({
|
||||
show,
|
||||
cancion,
|
||||
remove,
|
||||
close,
|
||||
}: {
|
||||
show: boolean;
|
||||
cancion: Cancion;
|
||||
remove: (e: FormEvent) => void;
|
||||
close: (arg0: boolean) => void;
|
||||
}) {
|
||||
const [checked, setcheked] = useState(false);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
show={show}
|
||||
onClose={() => close(false)}
|
||||
closeable={true}
|
||||
maxWidth="md"
|
||||
>
|
||||
<form onSubmit={remove} className="p-6">
|
||||
<h2 className="mb-2 text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
Eliminando Canción
|
||||
</h2>
|
||||
<hr />
|
||||
<div className="mt-2 flex">
|
||||
<Checkbox onChange={() => setcheked(!checked)} />
|
||||
<InputLabel>Cancion a eliminar: {cancion.title}</InputLabel>
|
||||
<hr className="mt-2" />
|
||||
<div className="flex place-content-center">
|
||||
<PrimaryButton className="mt-2" type="submit" disabled={!checked}>
|
||||
Aceptar
|
||||
</PrimaryButton>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user