feat(Darkmode): add Darkmode

This commit is contained in:
0ry5 2024-09-13 21:28:03 +02:00
parent 04d9b86419
commit 2016a8619d
11 changed files with 216 additions and 159 deletions
frontend/src/shared/components/modals

View file

@ -5,7 +5,6 @@ import { ModalHeader } from "./ModalHeader";
import { useForm, useWatch } from "react-hook-form";
import { Book, bookShelfs } from "../../../types/Book";
import { useScanner } from "../../utils/useScanner";
import { primary, primaryRGBA, secondary } from "../../../colors";
import { BookModalProps } from "./types";
type BookForm = Pick<Book, "isbn" | "title" | "shelf" | "published">;
@ -94,12 +93,7 @@ export const BookModal = ({
);
return (
<Modal
show={open}
onHide={onClose}
style={{ backgroundColor: primaryRGBA }}
centered
>
<Modal show={open} onHide={onClose} centered>
<ModalHeader
onClose={onClose}
title={`${!!book ? "Edit" : "Add new"} Book`}
@ -107,9 +101,7 @@ export const BookModal = ({
/>
<Modal.Body
style={{
border: "2px solid black",
borderTop: "none",
backgroundColor: primary,
}}
>
{!showScanner && (
@ -136,9 +128,6 @@ export const BookModal = ({
<Button
style={{
borderRadius: "0px 5px 5px 0px",
backgroundColor: secondary,
color: "black",
border: "2px solid black",
}}
className='mr-2 pt-0'
disabled={showScanner}
@ -237,9 +226,6 @@ export const BookModal = ({
<Button
style={{
borderRadius: "5px",
backgroundColor: secondary,
color: "black",
border: "2px solid black",
marginLeft: "auto",
marginRight: "10px",
}}
@ -260,7 +246,6 @@ export const BookModal = ({
className='drawingBuffer w-100 position-absolute'
style={{
height: "100%",
border: "2px solid black",
}}
/>
</div>