1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00
checktheroads 0728965999 fix import
2020-01-17 02:50:57 -07:00

27 lines
743 B
JavaScript

import React from "react";
import { Box, useColorMode, useTheme } from "@chakra-ui/core";
export default ({ children }) => {
const { colorMode } = useColorMode();
const theme = useTheme();
const bg = { dark: theme.colors.gray[800], light: theme.colors.blackAlpha[100] };
const color = { dark: theme.colors.white, light: theme.colors.black };
return (
<Box
fontFamily="mono"
mt={5}
p={3}
border="1px"
borderColor="inherit"
rounded="md"
bg={bg[colorMode]}
color={color[colorMode]}
fontSize="sm"
whiteSpace="pre-wrap"
as="pre"
>
{children}
</Box>
);
};