diff --git a/beta/src/components/Layout/HomeContent.tsx b/beta/src/components/Layout/HomeContent.tsx index 7c050c8f4..8f522409e 100644 --- a/beta/src/components/Layout/HomeContent.tsx +++ b/beta/src/components/Layout/HomeContent.tsx @@ -2,6 +2,7 @@ * Copyright (c) Facebook, Inc. and its affiliates. */ +import {useState} from 'react'; import ButtonLink from '../ButtonLink'; import {Logo} from 'components/Logo'; import Link from 'next/link'; @@ -422,8 +423,11 @@ export function HomeContent() { } function Example() { + const [hover, setHover] = useState(false); return (
setHover(true)} + onPointerLeave={() => setHover(false)} style={{ width: 500, height: 300, @@ -431,14 +435,26 @@ function Example() { }}>
-
+
Alan Turing
@@ -463,6 +483,12 @@ function Example() { color: 'grey', fontSize: 12, marginBottom: 20, + backgroundColor: '#f0f0f0', + transform: hover ? 'translate3d(20px, 0, 100px)' : '', + transformStyle: 'preserve-3d', + transition: 'all 0.4s ease-in-out', + border: hover ? '2px dashed #ddd' : '2px dashed transparent', + margin: 10, }}> Machines take me by surprise with great frequency.
@@ -472,6 +498,11 @@ function Example() { color: 'white', borderRadius: 4, padding: '4px 10px', + transform: hover ? 'translate3d(20px, 0, 100px)' : '', + transformStyle: 'preserve-3d', + transition: 'all 0.4s ease-in-out', + border: hover ? '2px dashed #ddd' : '2px dashed transparent', + margin: 10, }}> Like