From a22aa58746cc852331d48e1d9d3c00f5e09564a1 Mon Sep 17 00:00:00 2001 From: Factiven Date: Sat, 29 Apr 2023 17:42:24 +0700 Subject: Editor List v0.7 --- components/listEditor.js | 166 ++++++++++++++++++++++++----------------------- components/modal.js | 2 +- 2 files changed, 86 insertions(+), 82 deletions(-) (limited to 'components') diff --git a/components/listEditor.js b/components/listEditor.js index 64ca632..50a62c5 100644 --- a/components/listEditor.js +++ b/components/listEditor.js @@ -1,6 +1,6 @@ import { useState } from "react"; import useAlert from "./useAlert"; -import { motion as m } from "framer-motion"; +import { AnimatePresence, motion as m } from "framer-motion"; import Image from "next/image"; const ListEditor = ({ animeId, session, stats, prg, max, image = null }) => { @@ -51,93 +51,97 @@ const ListEditor = ({ animeId, session, stats, prg, max, image = null }) => { }; return ( -
- {message && ( - - {message} - - )} +
List Editor
-
- {image && ( -
- image - image -
+ + {message && ( + + {message} + )} -
-
-
- - -
-
- - setProgress(e.target.value)} - className="rounded-sm px-2 py-1 bg-[#363642] w-[50%] sm:w-[150px] text-sm sm:text-base" - min="0" + +
+
+ {image && ( +
+ image + image
-
- - +
+
+ + +
+
+ + setProgress(e.target.value)} + className="rounded-sm px-2 py-1 bg-[#363642] w-[50%] sm:w-[150px] text-sm sm:text-base" + min="0" + /> +
+
+ + +
); diff --git a/components/modal.js b/components/modal.js index f237d77..78b76d7 100644 --- a/components/modal.js +++ b/components/modal.js @@ -8,7 +8,7 @@ export default function Modal({ open, onClose, children }) { >
e.stopPropagation()} - className={`shadow rounded-xl p-6 transition-all ${ + className={`shadow rounded-xl transition-all ${ open ? "scale-100 opacity-100" : "scale-75 opacity-0" }`} > -- cgit v1.2.3