diff --git a/demo/src/App.tsx b/demo/src/App.tsx index 39baa9a..6d000dd 100644 --- a/demo/src/App.tsx +++ b/demo/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react' +import React, { useCallback, useRef, useState } from 'react' import ReactColorA11y from 'react-color-a11y' import { Box, @@ -28,7 +28,9 @@ const SvgContent = ({ fillColor }: { fillColor: string }): JSX.Element => ( ) -function App (): JSX.Element { +function App(): JSX.Element { + const textContentRef = useRef(null); + const svgContentRef = useRef(null); const [backgroundColor, setBackgroundColor] = useState('#222222') const [foregroundColor, setForegroundColor] = useState('#333333') const [requiredContrastRatio, setRequiredContrastRatio] = useState(4.5) @@ -65,7 +67,7 @@ function App (): JSX.Element { flipBlackAndWhite={flipBlackAndWhite} preserveContrastDirectionIfPossible={preserveContrastDirectionIfPossible} > -