Fix box shadow spring

This commit is contained in:
Robert Long 2021-08-13 13:05:21 -07:00
parent 7471e4b8c0
commit 3ad3098f04

View file

@ -202,14 +202,19 @@ export function GridDemo() {
{stream && <button onClick={removeTile}>Remove Tile</button>} {stream && <button onClick={removeTile}>Remove Tile</button>}
</div> </div>
<div className={styles.grid} ref={gridRef}> <div className={styles.grid} ref={gridRef}>
{springs.map((style, i) => { {springs.map(({ shadow, ...style }, i) => {
const tile = tiles[i]; const tile = tiles[i];
return ( return (
<ParticipantTile <ParticipantTile
{...bind(i)} {...bind(i)}
key={tile.key} key={tile.key}
style={style} style={{
boxShadow: shadow.to(
(s) => `rgba(0, 0, 0, 0.5) 0px ${s}px ${2 * s}px 0px`
),
...style,
}}
{...tile} {...tile}
/> />
); );