diff --git a/custom.d.ts b/custom.d.ts index f2d12bb..ef95ff2 100644 --- a/custom.d.ts +++ b/custom.d.ts @@ -2,3 +2,5 @@ declare module "*.module.css" { const classes: { [key: string]: string }; export default classes; } + +declare module "*.svg"; diff --git a/src/Bookshelf/AddBook/AddBook.module.css b/src/Bookshelf/AddBook/AddBook.module.css new file mode 100644 index 0000000..21cee30 --- /dev/null +++ b/src/Bookshelf/AddBook/AddBook.module.css @@ -0,0 +1,25 @@ +.container { + width: 300px; + padding-left: 10px; + transition: border-left-width 0.2s cubic-bezier(0.45, 0.05, 0.55, 0.95), + padding-left 0.2s cubic-bezier(0.45, 0.05, 0.55, 0.95); + border: 1px lightgrey solid; + background: none; + display: flex; + align-items: center; + font-family: Inter, system-ui, sans-serif; +} + +.container:hover { + padding-left: 20px; + border-left-width: 10px; +} + +.container > * { + line-height: 70vh; +} + +.plus { + height: 30px; + margin-right: 10px; +} diff --git a/src/Bookshelf/AddBook/index.tsx b/src/Bookshelf/AddBook/index.tsx new file mode 100644 index 0000000..11fca23 --- /dev/null +++ b/src/Bookshelf/AddBook/index.tsx @@ -0,0 +1,13 @@ +import React from "react"; + +import plusIcon from "./plus.svg"; +import styles from "./AddBook.module.css"; + +export const AddBook = () => { + return ( + + ); +}; diff --git a/src/Bookshelf/AddBook/plus.svg b/src/Bookshelf/AddBook/plus.svg new file mode 100644 index 0000000..a510087 --- /dev/null +++ b/src/Bookshelf/AddBook/plus.svg @@ -0,0 +1,28 @@ + + + + + + + + + diff --git a/src/Bookshelf/BookItem/BookItem.module.css b/src/Bookshelf/BookItem/BookItem.module.css index 2a0f524..d98dbaf 100644 --- a/src/Bookshelf/BookItem/BookItem.module.css +++ b/src/Bookshelf/BookItem/BookItem.module.css @@ -1,6 +1,6 @@ .bookCard { width: 300px; - border: 1px lightgray solid; + border: 1px lightgrey solid; overflow: hidden; display: flex; justify-content: stretch; @@ -19,7 +19,6 @@ height: auto; justify-content: center; padding: 10px; - transition: height 0.3s; } .cardHeading > * { @@ -28,7 +27,7 @@ .imageContainer { max-height: 0%; - transition: max-height 0.3s; + transition: max-height 0.3s cubic-bezier(0.45, 0.05, 0.55, 0.95); overflow: hidden; display: flex; } diff --git a/src/Bookshelf/index.tsx b/src/Bookshelf/index.tsx index 093bbea..5d5c64a 100644 --- a/src/Bookshelf/index.tsx +++ b/src/Bookshelf/index.tsx @@ -5,6 +5,7 @@ import styles from "./Bookshelf.module.css"; import list from "../assets/bookList.json"; import { BookItem } from "./BookItem"; +import { AddBook } from "./AddBook"; export const Bookshelf = () => { const [books, setBooks] = useState(list); @@ -12,6 +13,7 @@ export const Bookshelf = () => { return (
+ {books.map((book, index) => ( ))} diff --git a/src/index.css b/src/index.css index fe426db..5b578eb 100644 --- a/src/index.css +++ b/src/index.css @@ -15,10 +15,11 @@ body { font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - background: rgba(54, 54, 69, 0.05) none repeat scroll 0% 0%; - color: rgb(54, 54, 69); + background: rgba(0, 0, 0, 0.05) none repeat scroll 0% 0%; + color: #000; } code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; -} \ No newline at end of file + font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", + monospace; +}