import React from 'react' ; import { motion } from 'framer-motion' ; const CodeMirror = require ( 'react-codemirror' ) ; require ( 'codemirror/mode/javascript/javascript' ) ; interface PreBoxProps { handleChange : ( code : string ) => void ; code : string ; } const PreBox = ( props ) : any => { const options = { value : '' , tabsize : 2 , mode : "javascript" , theme : "dracula" , lineNumbers : true , } ; return ( < div id = "preBox" > < CodeMirror options = { options } onChange = { props . handleChange } / > < /div>); } ; export default PreBox ;