From 646c64c7d9177652697ba6b1a35d88400abbde6c Mon Sep 17 00:00:00 2001 From: MikeBaier5 Date: Mon, 8 May 2023 01:46:31 +0200 Subject: [PATCH] Hovering tile finished --- .DS_Store | Bin 0 -> 8196 bytes .idea/.gitignore | 5 +++ .idea/anwendungsprojekt.iml | 12 ++++++ .idea/modules.xml | 8 ++++ .idea/vcs.xml | 6 +++ anwendung/src/components/tile.jsx | 67 ++++++++++++++++++++++++++++++ anwendung/src/styles/globals.css | 1 + 7 files changed, 99 insertions(+) create mode 100644 .DS_Store create mode 100644 .idea/.gitignore create mode 100644 .idea/anwendungsprojekt.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 anwendung/src/components/tile.jsx diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..26c6e92ac975d6905db8de302ec2e8b75e439f69 GIT binary patch literal 8196 zcmeHMzmF0@6n?{T#}dwjLK7OzCKfh$?w#iua}6RESJ=2l3pEG_a_cQS1Qsa>3AI*M zhT4J{3tRsI6a5FQsjaovH$Q;cg#~ObhMP%dzGddUot^K!nYV8N0FrN4b^$T~U|?mK zPGK{ruyIyrN=)`#K_sXTZf(~-ruD{*r0&oRXa+O`ngPv#X5fEe0An^QMnv2fqq@}$ zXa>$D1MGY-u`a2R1wfK#XHIFL<417l@|BoW#CB9Kk|_Dxy#&GQ}W59s5lw zmy_5RDAa+-9+xLI6_rOLJ2(RKo#2xw6U!nx%61h!ZtFSVdoDo zOktizxzlP$jW6Yf>$H5!`axnF@y)G-kuXxmbNhsLY`^5UTlrG+Df{(^Qnx(5E|niU z)lM;e@gDX3lH*mIT*0YSQRLYZ$E(mzp0>S8i|g8Az(^X&Vmj09?pym=^Oj}xvS#}M z+}7#TLW?C;Tfqi@&N=scZ8tradNmwpD@&ub+VB#5w5J2EuqRxHBeZRm**Ij|�r? zcB%fFSbFI?19mqOgH^ayz2L*ocVjPDI+yAb|DqT05QE3urE`V+Wg80U6)p6Y8t(i^ zKOvVxeiEq{;BELlfqId$Dqo+P@5g*Cke}|IRpbNw3`h7Vkbnj>fx;_X^(pwl-9XqG zpzel{^qTm7XjK7=rM9lkvZUH+@L+Pfh3=zzakNyxCfnR+L-z@JD6`r+7jd#fhUNeF zqrd;JGX;8Wnt^lA0ErjuLLO-tzo3R0VY#-6^#xW|m|R~VSHXs- + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..da0c51c --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/anwendung/src/components/tile.jsx b/anwendung/src/components/tile.jsx new file mode 100644 index 0000000..55a7af2 --- /dev/null +++ b/anwendung/src/components/tile.jsx @@ -0,0 +1,67 @@ +import React from 'react'; + +const Tile = () => { + const [isHovered, setIsHovered] = React.useState(false); + const [cursorPosition, setCursorPosition] = React.useState({ x: 0, y: 0 }); + const tileRef = React.useRef(null); + + const handleMouseEnter = () => { + setIsHovered(true); + }; + + const handleMouseLeave = () => { + setIsHovered(false); + }; + + const handleMouseMove = (event) => { + if (tileRef.current) { + const rect = tileRef.current.getBoundingClientRect(); + setCursorPosition({ + x: event.clientX - rect.left, + y: event.clientY - rect.top, + }); + } + }; + + return ( +
+ Kalender + + + {isHovered && ( +
+ )} +
+ ); +}; + +export default Tile; diff --git a/anwendung/src/styles/globals.css b/anwendung/src/styles/globals.css index 6ae40b4..ec7cbc8 100644 --- a/anwendung/src/styles/globals.css +++ b/anwendung/src/styles/globals.css @@ -298,3 +298,4 @@ Calender View cursor: default; pointer-events: none; } +