Skip to content

Commit

Permalink
pass logo url via function
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceau committed Jan 22, 2024
1 parent 3b637e1 commit 1b7cb87
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ const styles = stylex.create({
height: "80px",
width: "80px",
},
logo: {
logo: (logoUrl: string) => ({
backgroundImage: `url("${logoUrl}")`,
backgroundSize: "contain",
backgroundRepeat: "no-repeat",
position: "absolute",
height: "60px",
width: "80px",
},
}),
onlyBounce: {
animation: `${bounceAnimation} 0.6s infinite alternate`,
},
Expand Down Expand Up @@ -62,12 +63,12 @@ export const BouncingSlippiLogo = () => {
return (
<div {...stylex.props(styles.container)}>
<div
{...stylex.props(styles.logo, animationState === "ready" ? styles.onlyBounce : styles.bouncePlusSpin)}
{...stylex.props(
styles.logo(slippiLogo),
animationState === "ready" ? styles.onlyBounce : styles.bouncePlusSpin,
)}
ref={ref}
onMouseOver={onMouseOver}
style={{
backgroundImage: `url("${slippiLogo}")`,
}}
/>
</div>
);
Expand Down

0 comments on commit 1b7cb87

Please sign in to comment.