({ children, ...rest }: HTMLProps<HTMLDivElement>)
| 3 | import { useEditorOptions } from './context/EditorOptions'; |
| 4 | |
| 5 | export default function Canvas({ children, ...rest }: HTMLProps<HTMLDivElement>) { |
| 6 | const editorOptions = useEditorOptions(); |
| 7 | const canvasRef = useRef<HTMLDivElement>(null); |
| 8 | |
| 9 | useEffect(() => { |
| 10 | canvasRef.current && editorOptions.setRefCanvas(canvasRef.current); |
| 11 | }, [canvasRef.current]); |
| 12 | |
| 13 | return ( |
| 14 | <div {...rest} ref={canvasRef}> |
| 15 | {children} |
| 16 | </div> |
| 17 | ); |
| 18 | } |
nothing calls this directly
no test coverage detected