import { Tag, Modal, HStack, Button, useTheme, ModalBody, ModalHeader, ModalOverlay, ModalContent, useColorMode, useDisclosure, ModalCloseButton, } from '@chakra-ui/react'; import { useConfig, useColorValue, useBreakpointValue } from '~/context'; import { CodeBlock } from '~/components'; import type { UseDisclosureReturn } from '@chakra-ui/react'; interface TViewer extends Pick { title: string; children: React.ReactNode; } const Viewer = (props: TViewer) => { const { title, isOpen, onClose, children } = props; const bg = useColorValue('white', 'black'); const color = useColorValue('black', 'white'); return ( {title} {children} ); }; export const Debugger = () => { const { isOpen: configOpen, onOpen: onConfigOpen, onClose: configClose } = useDisclosure(); const { isOpen: themeOpen, onOpen: onThemeOpen, onClose: themeClose } = useDisclosure(); const { colorMode } = useColorMode(); const config = useConfig(); const theme = useTheme(); const borderColor = useColorValue('gray.100', 'gray.600'); const mediaSize = useBreakpointValue({ base: 'SMALL', md: 'MEDIUM', lg: 'LARGE', xl: 'X-LARGE' }) ?? 'UNKNOWN'; const tagSize = useBreakpointValue({ base: 'sm', lg: 'lg' }) ?? 'lg'; const btnSize = useBreakpointValue({ base: 'xs', lg: 'sm' }) ?? 'sm'; return ( <> {colorMode.toUpperCase()} {mediaSize} {JSON.stringify(config, null, 4)} {JSON.stringify(theme, null, 4)} ); };