diff --git a/src/components/BookToggle/index.scss b/src/components/BookToggle/index.scss index b1bdec6..e0a8691 100644 --- a/src/components/BookToggle/index.scss +++ b/src/components/BookToggle/index.scss @@ -2,34 +2,42 @@ width: calc(100% - 60px); background-color: transparent; height: calc(100vh / 1.8); + transition: all 0.3s; + &__info { width: calc(100% / 2.5); + &--link { + transition: all 0.3s; + width: fit-content; + border-radius: 4px; + padding: 10px 35px; + align-self: end; + margin-top: 60px; + &:hover{ + border-color: $green; + color: $green; + } + } } - img { + + &__img { height: 90%; border-radius: 8px; + img{ + width : 100%; + height : 100%; + } } p { margin-top: 20px; } - a { - transition: all 0.3s; - width: fit-content; - border-radius: 4px; - padding: 10px 35px; - align-self: end; - margin-top: 60px; - &:hover{ - border-color: $green; - color: $green; - } - } + &-light { strong, p { color: $gray5; } - a { + .book-toggle__info--link{ box-shadow: 0px 8px 10px rgba(0, 0, 0, 0.1); color: $gray7; } @@ -39,7 +47,7 @@ p { color: $gray12; } - a{ + .book-toggle__info--link{ border: 1px solid white; color: white; } diff --git a/src/components/BookToggle/index.tsx b/src/components/BookToggle/index.tsx index 1e28789..d593905 100644 --- a/src/components/BookToggle/index.tsx +++ b/src/components/BookToggle/index.tsx @@ -1,15 +1,24 @@ -import React from "react"; -import {Link} from 'react-router-dom'; +import React, { useState, useEffect } from "react"; +import { Link } from "react-router-dom"; import _ from "lodash"; import { connect } from "react-redux"; function BookToggle({ book, theme }: any) { + const [fade, setFade] = useState(false); + useEffect(() => {}, []); + useEffect(() => { + setFade(false); + setTimeout(() => { + setFade(true); + }, 500); + }, [book]); return (