Skip to content

Commit

Permalink
Add dots animation
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Oct 23, 2023
1 parent 48a7a76 commit f2f3dd0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/walletconnect/WcConnectionState/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ const WcConnectionState = ({ metadata, isDelete }: { metadata?: CoreTypes.Metada
<div className={css.container}>
<div>
<SafeLogo alt="Safe logo" width="28px" height="28px" />

<SvgIcon
component={ConnectionDots}
inheritViewBox
sx={{ mx: 2 }}
className={classNames({ [css.errorDots]: isDelete })}
className={classNames(css.dots, { [css.errorDots]: isDelete })}
/>

<SafeAppIconCard src={icon} width={28} height={28} alt={`${name} logo`} />
</div>

<Typography variant="h5" mt={3}>
{isDelete ? `${name} disconnected` : `${name} successfully connected!`}
</Typography>
Expand Down
26 changes: 26 additions & 0 deletions src/components/walletconnect/WcConnectionState/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,29 @@
.errorDots circle:nth-of-type(4) {
fill: var(--color-error-light);
}

@keyframes blink {
0% {
opacity: 0.2;
}
100% {
transform: 1;
}
}

.dots circle {
animation: blink 1.5s ease-in-out infinite;
}

.dots circle:nth-of-type(1) {
animation-delay: 0;
}
.dots circle:nth-of-type(2),
.dots circle:nth-of-type(5) {
animation-delay: 0.2s;
}

.dots circle:nth-of-type(3),
.dots circle:nth-of-type(4) {
animation-delay: 0.3s;
}

0 comments on commit f2f3dd0

Please sign in to comment.