mirror of
https://github.com/System-End/site.git
synced 2026-04-19 22:05:11 +00:00
🎨 Whitespace
This commit is contained in:
parent
64fe54b137
commit
7207898245
1 changed files with 2 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import VanillaTilt from 'vanilla-tilt'
|
|||
// NOTE(@lachlanjc): only pass one child!
|
||||
const Tilt = ({ options = {}, children, ...props }) => {
|
||||
const root = useRef(null)
|
||||
|
||||
useEffect(() => {
|
||||
VanillaTilt.init(root.current, {
|
||||
max: 7.5,
|
||||
|
|
@ -15,6 +16,7 @@ const Tilt = ({ options = {}, children, ...props }) => {
|
|||
...options
|
||||
})
|
||||
}, [options])
|
||||
|
||||
return React.cloneElement(children, { ref: root })
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue