import { Box } from '@chakra-ui/react'; import { useConfig } from '~/context'; import { useColorValue } from '~/hooks'; import { Highlighted } from './highlighted'; import type { BoxProps } from '@chakra-ui/react'; type TextOutputProps = Swap; export const TextOutput = (props: TextOutputProps): JSX.Element => { const { children, ...rest } = props; const bg = useColorValue('blackAlpha.100', 'gray.800'); const color = useColorValue('black', 'white'); const selectionBg = useColorValue('black', 'white'); const selectionColor = useColorValue('white', 'black'); const { web: { highlight }, } = useConfig(); return ( {children.split('\\n').join('\n').replace(/\n\n/g, '\n')} ); };