Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

💄 Use the animated success check in the response saved dialogs (#3343)

Luke Vella5e355c275162
diff --git a/apps/landing/src/components/home/hero-demo/vote-actions.tsx b/apps/landing/src/components/home/hero-demo/vote-actions.tsx
index 9285135a9..4e18d6517 100644
--- a/apps/landing/src/components/home/hero-demo/vote-actions.tsx
+++ b/apps/landing/src/components/home/hero-demo/vote-actions.tsx
@@ -1,6 +1,7 @@
"use client";
import { posthog } from "@rallly/posthog/client";
-import { CircleCheckIcon, XIcon } from "lucide-react";
+import { SuccessCheck, SuccessCheckIcon } from "@rallly/ui/success-check";
+import { XIcon } from "lucide-react";
import * as m from "motion/react-m";
import Link from "next/link";
import * as React from "react";
@@ -56,23 +57,9 @@ export const VoteActions = () => {
>
<XIcon className="size-4" />
</button>
- <m.div
- initial={{ scale: 0, opacity: 0 }}
- animate={{ scale: 1, opacity: 1 }}
- transition={{
- type: "spring",
- duration: 0.6,
- bounce: 0.45,
- delay: 0.1,
- }}
- className="relative mb-3 inline-block"
- >
- <div className="absolute top-0 right-0 bottom-2 -left-1.5 origin-bottom -rotate-12 scale-95 rounded-xl bg-white opacity-75 shadow-xs ring-1 ring-gray-200 ring-inset" />
- <div className="absolute top-0 -right-1.5 bottom-2 left-0 origin-bottom rotate-12 scale-95 rounded-xl bg-white opacity-75 shadow-xs ring-1 ring-gray-200 ring-inset" />
- <div className="relative inline-flex rounded-xl bg-white p-2.5 shadow-xs ring-1 ring-gray-200 ring-inset">
- <CircleCheckIcon className="size-5 text-green-500" />
- </div>
- </m.div>
+ <SuccessCheck state="in" className="mb-3">
+ <SuccessCheckIcon className="size-9" />
+ </SuccessCheck>
<m.div
initial={{ opacity: 0, y: 6 }}
animate={{ opacity: 1, y: 0 }}
diff --git a/apps/web/src/features/poll/components/new-participant-modal.tsx b/apps/web/src/features/poll/components/new-participant-modal.tsx
index 68c106fa0..4003259cd 100644
--- a/apps/web/src/features/poll/components/new-participant-modal.tsx
+++ b/apps/web/src/features/poll/components/new-participant-modal.tsx
@@ -21,8 +21,9 @@ import {
import { Input } from "@rallly/ui/input";
import { Label } from "@rallly/ui/label";
import { MaxCharLength } from "@rallly/ui/max-char-length";
+import { SuccessCheck, SuccessCheckIcon } from "@rallly/ui/success-check";
import { Textarea } from "@rallly/ui/textarea";
-import { CircleCheckIcon, PlusIcon } from "lucide-react";
+import { PlusIcon } from "lucide-react";
import * as React from "react";
import { useForm } from "react-hook-form";
import * as z from "zod";
@@ -184,10 +185,9 @@ export const NewParticipantForm = (props: NewParticipantModalProps) => {
return (
<>
<div className="flex flex-col items-center gap-4 py-4 text-center">
- <CircleCheckIcon
- aria-hidden="true"
- className="size-10 text-green-500"
- />
+ <SuccessCheck state="in">
+ <SuccessCheckIcon />
+ </SuccessCheck>
<DialogHeader>
<DialogTitle>
<Trans
diff --git a/packages/ui/src/success-check.tsx b/packages/ui/src/success-check.tsx
index 6bab438a1..c50f97be7 100644
--- a/packages/ui/src/success-check.tsx
+++ b/packages/ui/src/success-check.tsx
@@ -47,7 +47,7 @@ function SuccessCheckIcon({ className }: { className?: string }) {
strokeWidth="4.5"
strokeLinecap="round"
strokeLinejoin="round"
- className="size-6"
+ className="size-1/2"
>
<title>Success</title>
<path d="M14 25l7 7 13-15" pathLength={20} />