mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-06 09:59:00 +02:00
✨ New and Improved Screens (#1151)
This commit is contained in:
parent
5461c57228
commit
997a1eec78
75 changed files with 1517 additions and 743 deletions
|
@ -1,7 +1,5 @@
|
|||
import { PollStatus } from "@rallly/database";
|
||||
import { cn } from "@rallly/ui";
|
||||
import { Badge } from "@rallly/ui/badge";
|
||||
import { CalendarCheckIcon, PauseIcon, RadioIcon } from "lucide-react";
|
||||
|
||||
import { Trans } from "@/components/trans";
|
||||
|
||||
|
@ -17,11 +15,11 @@ export const PollStatusLabel = ({
|
|||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"inline-flex items-center gap-x-1.5 text-sm font-medium text-gray-800",
|
||||
"inline-flex items-center gap-x-1.5 text-sm font-medium text-pink-600",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<RadioIcon className="inline-block size-4 opacity-75" />
|
||||
<span className="size-1.5 rounded-full bg-pink-600" />
|
||||
<Trans i18nKey="pollStatusOpen" defaults="Live" />
|
||||
</span>
|
||||
);
|
||||
|
@ -29,11 +27,12 @@ export const PollStatusLabel = ({
|
|||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"text-muted-foreground inline-flex items-center gap-x-1.5 text-sm font-medium",
|
||||
"inline-flex items-center gap-x-1.5 rounded-full text-sm font-medium text-gray-500",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<PauseIcon className="inline-block size-4 opacity-75" />
|
||||
<span className="size-1.5 rounded-full bg-gray-600" />
|
||||
|
||||
<Trans i18nKey="pollStatusPaused" defaults="Paused" />
|
||||
</span>
|
||||
);
|
||||
|
@ -41,11 +40,12 @@ export const PollStatusLabel = ({
|
|||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"text-primary-50 inline-flex items-center gap-x-1.5 text-sm font-medium",
|
||||
"inline-flex items-center gap-x-1.5 rounded-full text-sm font-medium text-green-600",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<CalendarCheckIcon className="inline-block size-4 opacity-75" />
|
||||
<span className="size-1.5 rounded-full bg-green-600" />
|
||||
|
||||
<Trans i18nKey="pollStatusFinalized" defaults="Finalized" />
|
||||
</span>
|
||||
);
|
||||
|
@ -53,18 +53,5 @@ export const PollStatusLabel = ({
|
|||
};
|
||||
|
||||
export const PollStatusBadge = ({ status }: { status: PollStatus }) => {
|
||||
return (
|
||||
<Badge
|
||||
size="lg"
|
||||
variant={
|
||||
status === "finalized"
|
||||
? "primary"
|
||||
: status === "paused"
|
||||
? "default"
|
||||
: "outline"
|
||||
}
|
||||
>
|
||||
<PollStatusLabel status={status} />
|
||||
</Badge>
|
||||
);
|
||||
return <PollStatusLabel status={status} />;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue