From bf34f482f15a156f1aff11634e520d213471d003 Mon Sep 17 00:00:00 2001 From: VividTruthKeeper Date: Mon, 23 Jan 2023 19:27:17 +0500 Subject: [PATCH] video link --- src/animations/video.animations.ts | 18 ++++++++++++++++++ src/assets/icons/arrow-right-white.svg | 10 ++++++++++ src/components/video/Video.tsx | 16 ++++++++++++++++ src/styles/_video.scss | 25 +++++++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 src/animations/video.animations.ts create mode 100644 src/assets/icons/arrow-right-white.svg diff --git a/src/animations/video.animations.ts b/src/animations/video.animations.ts new file mode 100644 index 0000000..6392602 --- /dev/null +++ b/src/animations/video.animations.ts @@ -0,0 +1,18 @@ +export const videoArrowMotion: Record< + string, + Record> +> = { + rest: { + duration: 0.3, + type: "spring", + x: 0, + }, + + hover: { + x: 10, + transition: { + duration: 0.2, + type: "tween", + }, + }, +}; diff --git a/src/assets/icons/arrow-right-white.svg b/src/assets/icons/arrow-right-white.svg new file mode 100644 index 0000000..c706875 --- /dev/null +++ b/src/assets/icons/arrow-right-white.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/components/video/Video.tsx b/src/components/video/Video.tsx index edbc17a..037d283 100644 --- a/src/components/video/Video.tsx +++ b/src/components/video/Video.tsx @@ -1,5 +1,7 @@ // Modules import { v4 as uuidv4 } from "uuid"; +import { Link } from "react-router-dom"; +import { motion } from "framer-motion"; // Components import VideoItem from "./VideoItem"; @@ -7,6 +9,12 @@ import VideoItem from "./VideoItem"; // Images import VideoItemImg from "../../assets/images/video-item.jpg"; +// Icons +import { ReactComponent as ArrowRightWhite } from "../../assets/icons/arrow-right-white.svg"; + +// Animations +import { videoArrowMotion } from "../../animations/video.animations"; + const Video = () => { const date = "11.01.2023"; const title = "В Туркменистане отметили Новый год"; @@ -33,6 +41,14 @@ const Video = () => { ); })} + + + Показать все видео + + + + + diff --git a/src/styles/_video.scss b/src/styles/_video.scss index 675436f..24119ce 100644 --- a/src/styles/_video.scss +++ b/src/styles/_video.scss @@ -53,3 +53,28 @@ line-height: 2.2rem; } } + +.video-link { + max-width: fit-content; + border-radius: 0.5rem; + background: $main; + .inner { + font-size: 1.6rem; + color: $white; + padding: 0.8rem 1.6rem; + display: flex; + align-items: center; + justify-content: flex-start; + gap: 1.6rem; + } + + .arrow-div { + display: flex; + align-items: center; + } + + svg { + width: 1.6rem; + height: 1.6rem; + } +}