diff --git a/dapp/src/components/DocsDrawer/index.tsx b/dapp/src/components/DocsDrawer/index.tsx index ad2d08fd0..bf7d48e41 100644 --- a/dapp/src/components/DocsDrawer/index.tsx +++ b/dapp/src/components/DocsDrawer/index.tsx @@ -4,7 +4,6 @@ import { DrawerBody, DrawerContent, DrawerOverlay, - useColorModeValue, } from "@chakra-ui/react" import { useDocsDrawer } from "../../hooks" import { TextMd } from "../Typography" @@ -15,16 +14,8 @@ export default function DocsDrawer() { return ( - - {/* TODO: Set the correct background color */} - + + {/* TODO: Add a documentation */} Documentation diff --git a/dapp/src/components/ModalOverlay/index.tsx b/dapp/src/components/ModalOverlay/index.tsx index 4e833163f..bac54856d 100644 --- a/dapp/src/components/ModalOverlay/index.tsx +++ b/dapp/src/components/ModalOverlay/index.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react" -import { Box, useColorModeValue } from "@chakra-ui/react" +import { Box } from "@chakra-ui/react" import { useModal } from "../../hooks" import { HEADER_HEIGHT } from "../Header" @@ -28,8 +28,8 @@ export default function ModalOverlay() { w="100vw" h="100vh" position="fixed" - // TODO: Set the correct background color - bg={useColorModeValue("grey.100", "grey.100")} + // TODO: Use the correct variables + bg="#F3E5C1" opacity={modalType ? 1 : 0} zIndex="overlay" // Hide the element when it is no longer needed. diff --git a/dapp/src/components/Modals/BaseModal.tsx b/dapp/src/components/Modals/BaseModal.tsx index 77fb89596..67905b833 100644 --- a/dapp/src/components/Modals/BaseModal.tsx +++ b/dapp/src/components/Modals/BaseModal.tsx @@ -16,14 +16,8 @@ export default function BaseModal({ children }: { children: React.ReactNode }) { closeModal() }} > - - + + {children} diff --git a/dapp/src/components/Sidebar/index.tsx b/dapp/src/components/Sidebar/index.tsx index acf999108..b6660027f 100644 --- a/dapp/src/components/Sidebar/index.tsx +++ b/dapp/src/components/Sidebar/index.tsx @@ -1,5 +1,5 @@ import React from "react" -import { Box, Button, useColorModeValue } from "@chakra-ui/react" +import { Box, Button } from "@chakra-ui/react" import DocsDrawer from "../DocsDrawer" import { useDocsDrawer, useSidebar } from "../../hooks" import { HEADER_HEIGHT } from "../Header" @@ -14,17 +14,24 @@ export default function Sidebar() { top={0} right={0} h="100vh" + w={isOpen ? 80 : 0} position="fixed" - width={isOpen ? 80 : 0} - height="100vh" + overflow="hidden" transition="width 0.3s" zIndex="sidebar" - // TODO: Set the correct background color - bg={useColorModeValue("white", "white")} mt={HEADER_HEIGHT} > - {/* TODO: Add a correct content for the sidebar */} - + + {/* TODO: Add a correct content for the sidebar */} + + diff --git a/dapp/src/theme/Drawer.ts b/dapp/src/theme/Drawer.ts index bdb9956e9..8037f16a5 100644 --- a/dapp/src/theme/Drawer.ts +++ b/dapp/src/theme/Drawer.ts @@ -5,6 +5,19 @@ const Drawer: ComponentSingleStyleConfig = { dialogContainer: { zIndex: "drawer", }, + overlay: { + // TODO: Use the correct variables + bg: "#F3E5C1", + }, + dialog: { + borderTop: "2px", + borderLeft: "2px", + boxShadow: "none", + borderColor: "white", + borderTopLeftRadius: "xl", + // TODO: Use the correct variables + bg: "#F8EFDA", + }, }, } diff --git a/dapp/src/theme/Modal.ts b/dapp/src/theme/Modal.ts new file mode 100644 index 000000000..88ca1f279 --- /dev/null +++ b/dapp/src/theme/Modal.ts @@ -0,0 +1,24 @@ +import { ComponentSingleStyleConfig } from "@chakra-ui/react" + +const Modal: ComponentSingleStyleConfig = { + baseStyle: { + dialog: { + p: 4, + border: "2px", + boxShadow: "none", + borderColor: "white", + borderRadius: "xl", + // TODO: Use the correct variables + bg: "#FBF7EC", + }, + closeButton: { + top: -10, + right: -10, + rounded: "100%", + // TODO: Use the correct variables + bg: "#FBF7EC", + }, + }, +} + +export default Modal diff --git a/dapp/src/theme/index.ts b/dapp/src/theme/index.ts index f3615173a..6f778895d 100644 --- a/dapp/src/theme/index.ts +++ b/dapp/src/theme/index.ts @@ -4,6 +4,7 @@ import Button from "./Button" import Switch from "./Switch" import { colors, fontSizes, fontWeights, lineHeights, zIndices } from "./utils" import Drawer from "./Drawer" +import Modal from "./Modal" // Currently, there is no possibility to set all tooltips with hasArrow by defaultProps. // Let's override the defaultProps as follows. @@ -27,6 +28,7 @@ const defaultTheme = { Button, Switch, Drawer, + Modal, }, }