diff options
author | 2020-11-18 23:15:38 +0100 | |
---|---|---|
committer | 2020-11-18 23:15:38 +0100 | |
commit | 1870f3fdf43707a15fda0f609a021f516f45eb63 (patch) | |
tree | fbaf527a47cd89a171df18da4b41e8ce34668555 /client/src/admin/hocs/WithHover.jsx | |
parent | e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d (diff) | |
download | website_creator-1870f3fdf43707a15fda0f609a021f516f45eb63.tar.gz website_creator-1870f3fdf43707a15fda0f609a021f516f45eb63.tar.bz2 website_creator-1870f3fdf43707a15fda0f609a021f516f45eb63.zip |
finish auth routes, create cookie token, fix folder structure, add context to FE
Diffstat (limited to 'client/src/admin/hocs/WithHover.jsx')
-rw-r--r-- | client/src/admin/hocs/WithHover.jsx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/client/src/admin/hocs/WithHover.jsx b/client/src/admin/hocs/WithHover.jsx new file mode 100644 index 0000000..2a5cdcb --- /dev/null +++ b/client/src/admin/hocs/WithHover.jsx @@ -0,0 +1,18 @@ +import React, {useContext} from 'react'; +import Context from '../context'; + + +const WithHover = ({ children, message, classes }) => { + const { setHover } = useContext(Context); + return ( + <div + onMouseEnter={()=>setHover(message)} + onMouseLeave={()=>setHover(null)} + className={classes} + > + {children} + </div> + ) +}; + +export default WithHover; |