diff options
Diffstat (limited to 'paste-ui/src/stateExample.js')
| -rw-r--r-- | paste-ui/src/stateExample.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/paste-ui/src/stateExample.js b/paste-ui/src/stateExample.js deleted file mode 100644 index 91fee18..0000000 --- a/paste-ui/src/stateExample.js +++ /dev/null @@ -1,32 +0,0 @@ -import { useState } from 'react'; -export default function MovingDot() { - const [position, setPosition] = useState({ - x: 0, - y: 0 - }); - return ( - <div - onPointerMove={e => { - setPosition({ - x: e.clientX, - y: e.clientY - }); - }} - style={{ - position: 'relative', - width: '100vw', - height: '100vh', - }}> - <div style={{ - position: 'absolute', - backgroundColor: 'red', - borderRadius: '50%', - transform: `translate(${position.x}px, ${position.y}px)`, - left: -10, - top: -10, - width: 20, - height: 20, - }} /> - </div> - ); -}
\ No newline at end of file |
