diff --git a/ui/components/Debugger.js b/ui/components/Debugger.js new file mode 100644 index 0000000..ffc68b9 --- /dev/null +++ b/ui/components/Debugger.js @@ -0,0 +1,79 @@ +import React from "react"; +import { + Button, + Modal, + ModalOverlay, + ModalContent, + ModalHeader, + ModalBody, + ModalCloseButton, + Stack, + Tag, + useDisclosure, + useColorMode, + useTheme +} from "@chakra-ui/core"; +import useConfig from "~/components/HyperglassProvider"; +import useMedia from "~/components/MediaProvider"; +import CodeBlock from "~/components/CodeBlock"; + +const prettyMediaSize = { sm: "SMALL", md: "MEDIUM", lg: "LARGE", xl: "X-LARGE" }; + +export default () => { + const { isOpen: configOpen, onOpen: onConfigOpen, onClose: configClose } = useDisclosure(); + const { isOpen: themeOpen, onOpen: onThemeOpen, onClose: themeClose } = useDisclosure(); + const config = useConfig(); + const theme = useTheme(); + const bg = { light: theme.colors.white, dark: theme.colors.black }; + const color = { light: theme.colors.black, dark: theme.colors.white }; + const { colorMode } = useColorMode(); + const { mediaSize } = useMedia(); + const colorModeBadge = { light: "gray", dark: "black" }; + const borderColor = { light: "gray.100", dark: "gray.600" }; + return ( + <> + + {colorMode.toUpperCase()} + {prettyMediaSize[mediaSize]} + + + + + + + Loaded Configuration + + + {JSON.stringify(config, null, 4)} + + + + + + + Loaded Theme + + + {JSON.stringify(theme, null, 4)} + + + + + ); +};