update store popup to include delete button

This commit is contained in:
SethBurkart123
2024-05-21 19:58:32 +10:00
parent a6fa3fe7d4
commit c9c357bec2
+17 -3
View File
@@ -221,11 +221,24 @@ const Store = () => {
<motion.p className="mb-4 text-gray-700 dark:text-gray-300" variants={textVariants}> <motion.p className="mb-4 text-gray-700 dark:text-gray-300" variants={textVariants}>
{displayTheme.description} {displayTheme.description}
</motion.p> </motion.p>
{
currentThemes.includes(displayTheme.id) ?
<motion.button <motion.button
onClick={() => downloadTheme(displayTheme.id)}
className="flex px-4 py-2 mt-4 ml-auto rounded-full dark:text-white bg-zinc-300 dark:bg-zinc-700 dark:hover:bg-zinc-600/50 hover:bg-zinc-200 focus:outline-none focus:ring-2 focus:ring-zinc-800 focus:ring-offset-2"
variants={textVariants} variants={textVariants}
> onClick={() => removeTheme(displayTheme.id)}
className="flex px-4 py-2 mt-4 ml-auto rounded-full dark:text-white bg-zinc-300 dark:bg-zinc-700 dark:hover:bg-zinc-600/50 hover:bg-zinc-200 focus:outline-none focus:ring-2 focus:ring-zinc-800 focus:ring-offset-2">
{ installingThemes.includes(displayTheme.id) ?
<>
<SpinnerIcon className="w-4 h-4 mr-2" />
Removing...
</> :
<> Remove </>
}
</motion.button> :
<motion.button
variants={textVariants}
onClick={() => downloadTheme(displayTheme.id)}
className="flex px-4 py-2 mt-4 ml-auto rounded-full dark:text-white bg-zinc-300 dark:bg-zinc-700 dark:hover:bg-zinc-600/50 hover:bg-zinc-200 focus:outline-none focus:ring-2 focus:ring-zinc-800 focus:ring-offset-2">
{ installingThemes.includes(displayTheme.id) ? { installingThemes.includes(displayTheme.id) ?
<> <>
<SpinnerIcon className="w-4 h-4 mr-2" /> <SpinnerIcon className="w-4 h-4 mr-2" />
@@ -234,6 +247,7 @@ const Store = () => {
<> Install </> <> Install </>
} }
</motion.button> </motion.button>
}
<motion.div className="my-8 border-b border-zinc-200 dark:border-zinc-700" variants={textVariants} /> <motion.div className="my-8 border-b border-zinc-200 dark:border-zinc-700" variants={textVariants} />