Add animations
This commit is contained in:
3 files changed
+52
-3
No files matched your search
@@ -90,12 +90,15 @@ event.on("set-api-accessToken", (serverAddress) => {
|
|||||||
|
|
||||||
const anim = {
|
const anim = {
|
||||||
initial: {
|
initial: {
|
||||||
|
transform: "scale(0.99)",
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
},
|
},
|
||||||
animate: {
|
animate: {
|
||||||
|
transform: "scale(1)",
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
},
|
},
|
||||||
exit: {
|
exit: {
|
||||||
|
transform: "scale(0.99)",
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import MenuItem from "@mui/material/MenuItem";
|
|||||||
import Link from "@mui/material/Link";
|
import Link from "@mui/material/Link";
|
||||||
import { green, pink, yellow } from "@mui/material/colors";
|
import { green, pink, yellow } from "@mui/material/colors";
|
||||||
|
|
||||||
import { AnimatePresence, motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
import { Blurhash } from "react-blurhash";
|
import { Blurhash } from "react-blurhash";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
@@ -2243,10 +2243,28 @@ const ItemDetail = () => {
|
|||||||
(mitem, mindex) => {
|
(mitem, mindex) => {
|
||||||
return (
|
return (
|
||||||
<Grid2
|
<Grid2
|
||||||
key={mindex}
|
component={
|
||||||
|
motion.div
|
||||||
|
}
|
||||||
|
key={mitem.Id}
|
||||||
xs={1}
|
xs={1}
|
||||||
sm={1}
|
sm={1}
|
||||||
md={1}
|
md={1}
|
||||||
|
initial={{
|
||||||
|
y: 30,
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
y: 0,
|
||||||
|
opacity: 1,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.45,
|
||||||
|
ease: "easeInOut",
|
||||||
|
delay:
|
||||||
|
mindex *
|
||||||
|
0.05,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<EpisodeCard
|
<EpisodeCard
|
||||||
itemId={
|
itemId={
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { motion } from "framer-motion";
|
||||||
import { useParams, useNavigate, Link } from "react-router-dom";
|
import { useParams, useNavigate, Link } from "react-router-dom";
|
||||||
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
@@ -931,10 +931,24 @@ const LibraryView = () => {
|
|||||||
{items.data.Items.map((item, index) => {
|
{items.data.Items.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<Grid2
|
<Grid2
|
||||||
|
component={motion.div}
|
||||||
key={item.Id}
|
key={item.Id}
|
||||||
xs={1}
|
xs={1}
|
||||||
sm={1}
|
sm={1}
|
||||||
md={1}
|
md={1}
|
||||||
|
initial={{
|
||||||
|
scale: 0.8,
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
scale: 1,
|
||||||
|
opacity: 1,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.25,
|
||||||
|
ease: "easeInOut",
|
||||||
|
delay: 0.02 * index,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
itemName={item.Name}
|
itemName={item.Name}
|
||||||
@@ -1004,6 +1018,7 @@ const LibraryView = () => {
|
|||||||
{items.data.Items.map((item, index) => {
|
{items.data.Items.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<TableRow
|
<TableRow
|
||||||
|
component={motion.div}
|
||||||
key={index}
|
key={index}
|
||||||
sx={{
|
sx={{
|
||||||
"& td,& th": {
|
"& td,& th": {
|
||||||
@@ -1017,6 +1032,19 @@ const LibraryView = () => {
|
|||||||
"rgb(255 255 255 / 0.05)",
|
"rgb(255 255 255 / 0.05)",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
initial={{
|
||||||
|
scale: 0.8,
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
scale: 1,
|
||||||
|
opacity: 1,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.25,
|
||||||
|
ease: "easeInOut",
|
||||||
|
delay: 0.02 * index,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<TableCell width="4.5em">
|
<TableCell width="4.5em">
|
||||||
<Box className="library-list-image-container">
|
<Box className="library-list-image-container">
|
||||||
|
|||||||
Reference in new issue
Block a user