Skip to content

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

✨ Add brandable event card and update UI for closed and scheduled poll status (#2315)

Luke Vellad537e957291f
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index 92085f20e..d360261dd 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -13,7 +13,6 @@
"continue": "Continue",
"configuredByEnvironmentVariable": "This setting has been configured by environment variable.",
"copied": "Copied",
- "createdBy": "by <b>{name}</b>",
"delete": "Delete",
"deleteDate": "Delete date",
"deletedPoll": "Deleted poll",
@@ -236,7 +235,6 @@
"paginationPage": "Page {currentPage, number} of {totalPages, number}",
"paginationNext": "Next",
"searchPollsPlaceholder": "Search polls by title...",
- "poll": "Poll",
"sendFeedbackDesc": "Share your feedback with us.",
"sendFeedbackSuccess": "Thank you for your feedback!",
"searchEventsPlaceholder": "Search events by title...",
@@ -580,7 +578,6 @@
"openPollCount": "{count, plural, other {# open}}",
"pollStatusClosed": "Closed",
"pollStatusScheduled": "Scheduled",
- "pollStatusClosedDescription": "Votes cannot be submitted or edited at this time",
"closePoll": "Close",
"pollStatusCanceled": "Canceled",
"schedulePoll": "Schedule",
@@ -619,5 +616,9 @@
"unmuteNotifications": "Unmute notifications",
"muteNotifications": "Mute notifications",
"creatingPoll": "Creating poll...",
- "createPollPollCreated": "Poll created"
+ "createPollPollCreated": "Poll created",
+ "viewPoll": "View poll",
+ "responseOptions": "Response Options",
+ "viewResults": "View results",
+ "pollClosedDescription": "No more responses are being accepted."
}
diff --git a/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/admin-page.tsx b/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/admin-page.tsx
index 04b67fc9b..17a8f6dd8 100644
--- a/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/admin-page.tsx
+++ b/apps/web/src/app/[locale]/(optional-space)/poll/[urlId]/admin-page.tsx
@@ -5,7 +5,6 @@ import { PollBranding } from "@/components/poll/poll-branding";
import { PollFooter } from "@/components/poll/poll-footer";
import { PollViewTracker } from "@/components/poll/poll-view-tracker";
import { ResponsiveResults } from "@/components/poll/responsive-results";
-import { ScheduledEvent } from "@/components/poll/scheduled-event";
import { VotingForm } from "@/components/poll/voting-form";
import { usePoll } from "@/contexts/poll";
import { GuestPollAlert } from "./guest-poll-alert";
@@ -23,7 +22,6 @@ export function AdminPage() {
<PollViewTracker pollId={poll.id} />
<GuestPollAlert />
<EventCard />
- <ScheduledEvent />
<VotingForm>
<ResponsiveResults />
</VotingForm>
diff --git a/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx b/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx
index c26c83480..498d807ec 100644
--- a/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx
+++ b/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx
@@ -8,7 +8,6 @@ import { PollBranding } from "@/components/poll/poll-branding";
import { PollFooter } from "@/components/poll/poll-footer";
import { PollViewTracker } from "@/components/poll/poll-view-tracker";
import { ResponsiveResults } from "@/components/poll/responsive-results";
-import { ScheduledEvent } from "@/components/poll/scheduled-event";
import { VotingForm } from "@/components/poll/voting-form";
import { useUser } from "@/components/user-provider";
import { usePoll } from "@/contexts/poll";
@@ -59,7 +58,6 @@ export function InvitePage() {
<div className="mx-auto w-full max-w-4xl space-y-3">
<GoToApp />
<EventCard />
- <ScheduledEvent />
<VotingForm>
<ResponsiveResults />
</VotingForm>
diff --git a/apps/web/src/components/event-card.tsx b/apps/web/src/components/event-card.tsx
index be17f26ae..7103eafc8 100644
--- a/apps/web/src/components/event-card.tsx
+++ b/apps/web/src/components/event-card.tsx
@@ -1,111 +1,108 @@
"use client";
-import { Alert, AlertDescription, AlertTitle } from "@rallly/ui/alert";
-import { Card, CardContent, CardDescription } from "@rallly/ui/card";
-import { Icon } from "@rallly/ui/icon";
-import { CircleStopIcon, DotIcon, MapPinIcon } from "lucide-react";
+import { Card, CardContent } from "@rallly/ui/card";
+import { MapPinIcon, User2Icon } from "lucide-react";
+import {
+ EventMetaDescription,
+ EventMetaItem,
+ EventMetaList,
+ EventMetaTitle,
+} from "@/components/event-meta";
import TruncatedLinkify from "@/components/poll/truncated-linkify";
import VoteIcon from "@/components/poll/vote-icon";
-import { PollStatusBadge } from "@/components/poll-status";
import { RandomGradientBar } from "@/components/random-gradient-bar";
import { usePoll } from "@/contexts/poll";
-import { Trans, useTranslation } from "@/i18n/client";
-import { dayjs } from "@/lib/dayjs";
+import { SpaceIcon } from "@/features/space/components/space-icon";
+import { Trans } from "@/i18n/client";
-function IconGuide() {
+function IconDescriptionList({
+ children,
+ ...props
+}: React.HTMLAttributes<HTMLDListElement>) {
return (
- <ul className="flex items-center gap-x-3 whitespace-nowrap text-sm">
- <li className="flex items-center gap-1.5">
- <VoteIcon type="yes" />
- <Trans i18nKey="yes" />
- </li>
- <li className="flex items-center gap-1.5">
- <VoteIcon type="ifNeedBe" />
- <Trans i18nKey="ifNeedBe" />
- </li>
- <li className="flex items-center gap-1.5">
- <VoteIcon type="no" />
- <Trans i18nKey="no" />
- </li>
- </ul>
+ <dl
+ className="flex flex-col gap-x-2 gap-y-1 text-muted-foreground text-xs"
+ {...props}
+ >
+ {children}
+ </dl>
+ );
+}
+
+function IconDescription({
+ icon,
+ label,
+}: {
+ icon: React.ReactNode;
+ label: React.ReactNode;
+}) {
+ return (
+ <div className="flex items-center gap-1">
+ <dt>{icon}</dt>
+ <dd>{label}</dd>
+ </div>
);
}
export function EventCard() {
const poll = usePoll();
- const { t } = useTranslation();
return (
- <>
- <Card>
- <RandomGradientBar />
- <CardContent className="space-y-4 sm:space-y-6">
- <div className="flex flex-col items-start gap-4 lg:flex-row lg:justify-between">
- <div>
- <h1 data-testid="poll-title" className="font-semibold text-lg">
- {poll.title}
- </h1>
- <CardDescription>
- <span className="flex items-center gap-0.5 whitespace-nowrap text-muted-foreground text-sm">
- <span>
- <Trans
- i18nKey="createdBy"
- values={{
- name: poll.user?.name ?? t("guest"),
- }}
- components={{
- b: <span />,
- }}
- />
- </span>
- <Icon>
- <DotIcon />
- </Icon>
- <span className="whitespace-nowrap">
- <Trans
- i18nKey="createdTime"
- values={{ relativeTime: dayjs(poll.createdAt).fromNow() }}
- />
- </span>
- </span>
- </CardDescription>
+ <Card>
+ <RandomGradientBar />
+ <CardContent className="flex flex-col gap-x-8 gap-y-4 md:flex-row">
+ <div className="flex-1">
+ {poll.space?.showBranding && poll.space.image ? (
+ <div className="mb-2">
+ <SpaceIcon
+ name={poll.space.name}
+ src={poll.space.image}
+ size="lg"
+ />
+ <p className="mt-2 font-medium text-muted-foreground text-sm">
+ {poll.space.name}
+ </p>
</div>
- {poll.status !== "open" ? (
- <PollStatusBadge status={poll.status} />
- ) : null}
+ ) : null}
+ <div className="flex items-start justify-between gap-2">
+ <EventMetaTitle>{poll.title}</EventMetaTitle>
</div>
{poll.description ? (
- <p className="min-w-0 whitespace-pre-wrap text-pretty text-sm leading-relaxed">
- <TruncatedLinkify>{poll.description}</TruncatedLinkify>
- </p>
+ <EventMetaDescription>{poll.description}</EventMetaDescription>
) : null}
- <div className="flex flex-col justify-between gap-4 sm:flex-row sm:flex-wrap sm:items-center">
- <IconGuide />
+ <EventMetaList className="mt-4">
+ {poll.user ? (
+ <EventMetaItem>
+ <User2Icon />
+ {poll.user.name}
+ </EventMetaItem>
+ ) : null}
{poll.location ? (
- <p className="truncate whitespace-nowrap text-muted-foreground text-sm">
- <Icon>
- <MapPinIcon className="-mt-0.5 mr-1.5 inline-block" />
- </Icon>
+ <EventMetaItem>
+ <MapPinIcon />
<TruncatedLinkify>{poll.location}</TruncatedLinkify>
- </p>
+ </EventMetaItem>
) : null}
- </div>
- </CardContent>
- </Card>
- {poll.status === "closed" ? (
- <Alert>
- <CircleStopIcon />
- <AlertTitle>
- <Trans i18nKey="pollStatusClosed" defaults="Closed" />
- </AlertTitle>
- <AlertDescription>
- <p>
- <Trans
- i18nKey="pollStatusClosedDescription"
- defaults="Votes cannot be submitted or edited at this time"
- />
- </p>
- </AlertDescription>
- </Alert>
- ) : null}
- </>
+ </EventMetaList>
+ </div>
+ <div className="w-full md:w-1/3">
+ <h2 className="mb-2 font-medium text-sm">
+ <Trans i18nKey="responseOptions" defaults="Response Options" />
+ </h2>
+ <IconDescriptionList aria-label="Response Options">
+ <IconDescription
+ icon={<VoteIcon type="yes" />}
+ label={<Trans i18nKey="yes" defaults="Yes" />}
+ />
+ <IconDescription
+ icon={<VoteIcon type="ifNeedBe" />}
+ label={<Trans i18nKey="ifNeedBe" defaults="If need be" />}
+ />
+ <IconDescription
+ icon={<VoteIcon type="no" />}
+ label={<Trans i18nKey="no" defaults="No" />}
+ />
+ </IconDescriptionList>
+ </div>
+ </CardContent>
+ </Card>
);
}
diff --git a/apps/web/src/components/event-meta.tsx b/apps/web/src/components/event-meta.tsx
index 84afd490a..e03ccdd85 100644
--- a/apps/web/src/components/event-meta.tsx
+++ b/apps/web/src/components/event-meta.tsx
@@ -10,7 +10,7 @@ export function EventMetaTitle({
children: React.ReactNode;
}) {
return (
- <h1 className={cn(className, "font-semibold text-xl tracking-tight")}>
+ <h1 className={cn("font-semibold text-xl tracking-tight", className)}>
{children}
</h1>
);
@@ -27,7 +27,7 @@ export function EventMetaDescription({
<p
className={cn(
className,
- "mt-2 min-w-0 whitespace-pre-wrap text-pretty text-sm leading-relaxed",
+ "mt-2 min-w-0 whitespace-pre-wrap text-pretty text-muted-foreground text-sm leading-relaxed",
)}
>
<TruncatedLinkify>{children}</TruncatedLinkify>
@@ -42,7 +42,7 @@ export function EventMetaList({
className?: string;
children: React.ReactNode;
}) {
- return <ul className={cn(className, "mt-4 space-y-2")}>{children}</ul>;
+ return <ul className={cn(className, "space-y-2")}>{children}</ul>;
}
export function EventMetaItem({
@@ -56,7 +56,7 @@ export function EventMetaItem({
<li
className={cn(
className,
- "flex items-center gap-1.5 text-muted-foreground text-sm",
+ "flex items-center gap-1.5 text-sm [&_svg]:size-4",
)}
>
{children}
@@ -71,7 +71,9 @@ export function EventMetaHost({
className?: string;
children: React.ReactNode;
}) {
- return <div className={cn(className, "mb-2")}>{children}</div>;
+ return (
+ <div className={cn(className, "flex items-center gap-2")}>{children}</div>
+ );
}
export const EventMetaHostAvatar = OptimizedAvatarImage;
@@ -83,9 +85,5 @@ export function EventMetaHostName({
className?: string;
children: React.ReactNode;
}) {
- return (
- <p className={cn(className, "mt-2 font-medium text-gray-500 text-sm")}>
- {children}
- </p>
- );
+ return <p className={cn(className, "text-gray-500 text-sm")}>{children}</p>;
}
diff --git a/apps/web/src/components/poll/desktop-poll.tsx b/apps/web/src/components/poll/desktop-poll.tsx
index a489d1263..e6b412135 100644
--- a/apps/web/src/components/poll/desktop-poll.tsx
+++ b/apps/web/src/components/poll/desktop-poll.tsx
@@ -248,7 +248,7 @@ const DesktopPoll: React.FunctionComponent = () => {
)}
ref={containerRef}
>
- <CardHeader className="flex items-center justify-between gap-4">
+ <CardHeader className="flex items-center justify-between gap-4 border-b">
<div className="flex items-center gap-x-2.5">
<CardTitle>
<Trans i18nKey="participants" />
@@ -313,7 +313,7 @@ const DesktopPoll: React.FunctionComponent = () => {
"scrollbar-thin dark:scrollbar-thumb-gray-600 dark:scrollbar-track-gray-800 hover:scrollbar-thumb-gray-400 dark:hover:scrollbar-thumb-gray-500 scrollbar-thumb-gray-300 scrollbar-track-gray-100 relative z-10 h-full min-h-0 grow overflow-auto overscroll-x-none",
)}
>
- <table className="w-full table-auto border-separate border-spacing-0 bg-muted/50">
+ <table className="w-full table-auto border-separate border-spacing-0">
<thead>
<PollHeader />
</thead>
diff --git a/apps/web/src/components/poll/desktop-poll/participant-row.tsx b/apps/web/src/components/poll/desktop-poll/participant-row.tsx
index 63d0bff59..caf1b0a5c 100644
--- a/apps/web/src/components/poll/desktop-poll/participant-row.tsx
+++ b/apps/web/src/components/poll/desktop-poll/participant-row.tsx
@@ -72,7 +72,7 @@ export const ParticipantRowView: React.FunctionComponent<{
</Participant>
<div className="flex items-center gap-x-2">
{isYou ? (
- <Badge className="shrink-0">
+ <Badge variant="secondary" className="shrink-0">
<Trans i18nKey="you" />
</Badge>
) : null}
diff --git a/apps/web/src/components/poll/mobile-poll.tsx b/apps/web/src/components/poll/mobile-poll.tsx
index 7eff70f29..bb89d0c3e 100644
--- a/apps/web/src/components/poll/mobile-poll.tsx
+++ b/apps/web/src/components/poll/mobile-poll.tsx
@@ -1,12 +1,6 @@
import { Badge } from "@rallly/ui/badge";
import { Button } from "@rallly/ui/button";
-import {
- Card,
- CardContent,
- CardFooter,
- CardHeader,
- CardTitle,
-} from "@rallly/ui/card";
+import { Card, CardContent, CardFooter } from "@rallly/ui/card";
import { Icon } from "@rallly/ui/icon";
import {
Select,
@@ -68,15 +62,6 @@ const MobilePoll: React.FunctionComponent = () => {
return (
<Card>
- <CardHeader>
- <div className="flex items-center gap-x-2.5">
- <CardTitle>
- <Trans i18nKey="participants" />
- </CardTitle>
- <Badge>{visibleParticipants.length}</Badge>
- </div>
- </CardHeader>
-
<div className="flex flex-col space-y-2 border-b p-2">
<div className="flex gap-x-2.5">
{selectedParticipantId || !isEditing ? (
diff --git a/apps/web/src/components/poll/responsive-results.tsx b/apps/web/src/components/poll/responsive-results.tsx
index 851a8fd53..f5c33339f 100644
--- a/apps/web/src/components/poll/responsive-results.tsx
+++ b/apps/web/src/components/poll/responsive-results.tsx
@@ -1,13 +1,125 @@
+"use client";
+
+import { Button } from "@rallly/ui/button";
+import { Card } from "@rallly/ui/card";
+import { CalendarIcon, LockIcon } from "lucide-react";
+import * as React from "react";
import { createBreakpoint } from "react-use";
+import { AddToCalendarButton } from "@/components/add-to-calendar-button";
+import {
+ EmptyState,
+ EmptyStateDescription,
+ EmptyStateFooter,
+ EmptyStateIcon,
+ EmptyStateTitle,
+} from "@/components/empty-state";
import DesktopPoll from "@/components/poll/desktop-poll";
import MobilePoll from "@/components/poll/mobile-poll";
+import { usePoll } from "@/contexts/poll";
+import { Trans } from "@/i18n/client";
+import { dayjs } from "@/lib/dayjs";
+import { useDayjs } from "@/utils/dayjs";
const useBreakpoint = createBreakpoint({ list: 320, table: 640 });
+function ScheduledDateTime({
+ start,
+ duration,
+ timeZone,
+}: {
+ start: Date;
+ duration: number;
+ timeZone: string | null;
+}) {
+ const { adjustTimeZone } = useDayjs();
+ const adjusted = adjustTimeZone(start, !timeZone);
+ const date = adjusted.format("dddd, LL");
+
+ if (duration === 0) {
+ return (
+ <span className="flex flex-col items-center gap-0.5">
+ <span>{date}</span>
+ <span>
+ <Trans i18nKey="allDay" />
+ </span>
+ </span>
+ );
+ }
+
+ const endTime = adjustTimeZone(
+ dayjs(start).add(duration, "minutes"),
+ !timeZone,
+ );
+ const time = `${adjusted.format("LT")} - ${endTime.format(timeZone ? "LT z" : "LT")}`;
+
+ return (
+ <span className="flex flex-col items-center gap-0.5">
+ <span className="text-foreground">{date}</span>
+ <span>{time}</span>
+ </span>
+ );
+}
+
export function ResponsiveResults() {
+ const poll = usePoll();
const breakpoint = useBreakpoint();
+ const [dismissed, setDismissed] = React.useState(false);
const PollComponent = breakpoint === "table" ? DesktopPoll : MobilePoll;
+ if (!dismissed && poll.status === "scheduled" && poll.event) {
+ return (
+ <Card>
+ <EmptyState>
+ <EmptyStateIcon>
+ <CalendarIcon />
+ </EmptyStateIcon>
+ <EmptyStateTitle>
+ <Trans i18nKey="pollStatusScheduled" defaults="Scheduled" />
+ </EmptyStateTitle>
+ <EmptyStateDescription>
+ <ScheduledDateTime
+ start={poll.event.start}
+ duration={poll.event.duration}
+ timeZone={poll.timeZone}
+ />
+ </EmptyStateDescription>
+ <EmptyStateFooter className="flex flex-wrap items-center justify-center gap-2">
+ <AddToCalendarButton eventId={poll.event.id} />
+ <Button onClick={() => setDismissed(true)}>
+ <Trans i18nKey="viewResults" defaults="View results" />
+ </Button>
+ </EmptyStateFooter>
+ </EmptyState>
+ </Card>
+ );
+ }
+
+ if (!dismissed && poll.status === "closed") {
+ return (
+ <Card>
+ <EmptyState>
+ <EmptyStateIcon>
+ <LockIcon />
+ </EmptyStateIcon>
+ <EmptyStateTitle>
+ <Trans i18nKey="pollStatusClosed" defaults="Closed" />
+ </EmptyStateTitle>
+ <EmptyStateDescription>
+ <Trans
+ i18nKey="pollClosedDescription"
+ defaults="No more responses are being accepted."
+ />
+ </EmptyStateDescription>
+ <EmptyStateFooter>
+ <Button onClick={() => setDismissed(true)}>
+ <Trans i18nKey="viewResults" defaults="View results" />
+ </Button>
+ </EmptyStateFooter>
+ </EmptyState>
+ </Card>
+ );
+ }
+
return <PollComponent />;
}
diff --git a/apps/web/src/trpc/client/types.ts b/apps/web/src/trpc/client/types.ts
index 3dc04bba5..d57ff018b 100644
--- a/apps/web/src/trpc/client/types.ts
+++ b/apps/web/src/trpc/client/types.ts
@@ -18,6 +18,13 @@ export type GetPollApiResponse = {
participantUrlId: string;
createdAt: Date;
deleted: boolean;
+ event: {
+ id: string;
+ start: Date;
+ duration: number;
+ attendees: Array<{ name: string; email: string; status: string }>;
+ status: string;
+ } | null;
};
export type Vote = {
diff --git a/apps/web/tests/create-delete-poll.spec.ts b/apps/web/tests/create-delete-poll.spec.ts
index 73e892414..74320bb5f 100644
--- a/apps/web/tests/create-delete-poll.spec.ts
+++ b/apps/web/tests/create-delete-poll.spec.ts
@@ -17,7 +17,9 @@ test.describe.serial(() => {
const dialog = await newPollPage.create({ name: "Monthly Meetup" });
await dialog.goToPollPage();
- await expect(page.getByTestId("poll-title")).toHaveText("Monthly Meetup");
+ await expect(
+ page.getByRole("heading", { name: "Monthly Meetup" }),
+ ).toBeVisible();
});
// delete the poll we just created
diff --git a/apps/web/tests/guest-to-user-migration.spec.ts b/apps/web/tests/guest-to-user-migration.spec.ts
index 22e9d9508..58d05136d 100644
--- a/apps/web/tests/guest-to-user-migration.spec.ts
+++ b/apps/web/tests/guest-to-user-migration.spec.ts
@@ -33,7 +33,6 @@ test.describe.serial(() => {
await newPollPage.goto();
const dialog = await newPollPage.create({ name: "Monthly Meetup" });
await dialog.goToPollPage();
- await expect(page.getByTestId("poll-title")).toHaveText("Monthly Meetup");
// Step 2: Navigate to registration
await page.click("text=Create an account");
@@ -42,8 +41,6 @@ test.describe.serial(() => {
// Step 3: Complete registration
const registerPage = new RegisterPage(page);
await registerPage.register(testUser);
-
- await expect(page.getByTestId("poll-title")).toHaveText("Monthly Meetup");
});
test("guest user can create a poll and link it to existing user", async ({
@@ -54,7 +51,9 @@ test.describe.serial(() => {
await newPollPage.goto();
const dialog = await newPollPage.create({ name: "Board Meeting" });
await dialog.goToPollPage();
- await expect(page.getByTestId("poll-title")).toHaveText("Board Meeting");
+ await expect(
+ page.getByRole("heading", { name: "Board Meeting" }),
+ ).toBeVisible();
// Step 2: Navigate to registration
await page.getByRole("link", { name: "Login" }).click();
@@ -67,7 +66,17 @@ test.describe.serial(() => {
password: testUser.password,
});
- // Step 4: Navigate back to the poll
- await expect(page.getByTestId("poll-title")).toHaveText("Board Meeting");
+ // Step 4: Verify the poll has been linked to the logged-in user
+ await expect(
+ page.getByRole("heading", { name: "Board Meeting" }),
+ ).toBeVisible();
+ const url = page.url();
+ const urlId = url.match(/\/poll\/([^/]+)/)?.[1];
+ expect(urlId).toBeTruthy();
+ const [poll, user] = await Promise.all([
+ prisma.poll.findUnique({ where: { id: urlId } }),
+ prisma.user.findUnique({ where: { email: testUser.email } }),
+ ]);
+ expect(poll?.userId).toBe(user?.id);
});
});
diff --git a/packages/tailwind-config/shared-styles.css b/packages/tailwind-config/shared-styles.css
index bebb1d298..96f735dfd 100644
--- a/packages/tailwind-config/shared-styles.css
+++ b/packages/tailwind-config/shared-styles.css
@@ -28,7 +28,7 @@
--destructive-foreground: var(--color-rose-100);
--background: var(--color-white);
- --foreground: var(--color-gray-700);
+ --foreground: var(--color-gray-800);
--accent: oklch(0.552 0.016 285.938 / 0.1);
--accent-border: var(--color-gray-300);
@@ -102,7 +102,7 @@
--popover-accent: var(--color-gray-700);
--card: color-mix(in srgb, var(--color-gray-800) 25%, transparent);
- --card-border: var(--color-gray-700);
+ --card-border: color-mix(in srgb, var(--color-gray-600) 50%, transparent);
--card-foreground: var(--color-gray-300);
--card-accent: rgba(255, 255, 255, 0.02);
}
diff --git a/packages/ui/src/avatar.tsx b/packages/ui/src/avatar.tsx
index 0cf28bbdf..d9b453a51 100644
--- a/packages/ui/src/avatar.tsx
+++ b/packages/ui/src/avatar.tsx
@@ -4,22 +4,19 @@ import type { VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";
import * as React from "react";
-const avatarVariants = cva(
- "relative flex shrink-0 overflow-hidden ring-1 ring-button-outline",
- {
- variants: {
- size: {
- xl: "size-12 rounded-xl text-lg",
- lg: "size-8 rounded-md text-sm",
- md: "size-5 rounded-md text-[10px]",
- sm: "size-4 rounded text-[8px]",
- },
- },
- defaultVariants: {
- size: "md",
+const avatarVariants = cva("relative flex shrink-0 overflow-hidden", {
+ variants: {
+ size: {
+ xl: "size-12 rounded-xl text-lg",
+ lg: "size-8 rounded-md text-sm",
+ md: "size-5 rounded-md text-[10px]",
+ sm: "size-4 rounded text-[8px]",
},
},
-);
+ defaultVariants: {
+ size: "md",
+ },
+});
export type AvatarProps = VariantProps<typeof avatarVariants>;
diff --git a/packages/ui/src/card.tsx b/packages/ui/src/card.tsx
index d77384a29..1e03b2751 100644
--- a/packages/ui/src/card.tsx
+++ b/packages/ui/src/card.tsx
@@ -23,10 +23,7 @@ const CardHeader = React.forwardRef<
>(({ className, ...props }, ref) => (
<div
ref={ref}
- className={cn(
- "grid rounded-t-md border-card-border border-b bg-card p-3 sm:px-4 sm:py-3",
- className,
- )}
+ className={cn("grid p-3 sm:px-4 sm:py-3", className)}
{...props}
/>
));
@@ -73,10 +70,7 @@ const CardFooter = React.forwardRef<
>(({ className, ...props }, ref) => (
<div
ref={ref}
- className={cn(
- "flex items-center gap-x-2 bg-card p-3 sm:px-4 sm:py-3",
- className,
- )}
+ className={cn("flex items-center gap-x-2 p-3 sm:px-4 sm:py-3", className)}
{...props}
/>
));