The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Match the comment input to the Figma design
Rafi333216436314
diff --git a/apps/web/ui/submitted-leads/partner-submitted-lead-comments.tsx b/apps/web/ui/submitted-leads/partner-submitted-lead-comments.tsxindex 6bfd0fbd0d..9836fa8068 100644--- a/apps/web/ui/submitted-leads/partner-submitted-lead-comments.tsx+++ b/apps/web/ui/submitted-leads/partner-submitted-lead-comments.tsx@@ -9,7 +9,12 @@ import { MessageInput } from "@/ui/shared/message-input";import { useAction } from "next-safe-action/hooks";import { toast } from "sonner";import { v4 as uuid } from "uuid";-import { CommentCard, CommentWithDelivery } from "./submitted-lead-comments";+import {+ COMMENT_INPUT_CLASSNAME,+ COMMENT_TOOLBAR_CLASSNAME,+ CommentCard,+ CommentWithDelivery,+} from "./submitted-lead-comments";export function PartnerSubmittedLeadComments({ leadId }: { leadId: string }) {const { user } = useUser();@@ -81,6 +86,8 @@ export function PartnerSubmittedLeadComments({ leadId }: { leadId: string }) {}}placeholder="Leave a comment for this program"sendButtonText="Post"+ inputClassName={COMMENT_INPUT_CLASSNAME}+ toolbarClassName={COMMENT_TOOLBAR_CLASSNAME}/>{comments && program ? (diff --git a/apps/web/ui/submitted-leads/submitted-lead-comments.tsx b/apps/web/ui/submitted-leads/submitted-lead-comments.tsxindex 62967d8c4a..cb9ea1d65b 100644--- a/apps/web/ui/submitted-leads/submitted-lead-comments.tsx+++ b/apps/web/ui/submitted-leads/submitted-lead-comments.tsx@@ -34,6 +34,11 @@ export type CommentWithDelivery = SubmittedLeadCommentProps & {delivered?: false;};+// Sizes from the Figma design for the comment input+export const COMMENT_INPUT_CLASSNAME =+ "mx-1 mt-1 rounded-[10px] border border-transparent transition-colors [&>[aria-hidden]]:rounded-[9px] [&_.ProseMirror]:min-h-16";+export const COMMENT_TOOLBAR_CLASSNAME = "p-2";+const VISIBILITY_OPTIONS = [{ partnerVisible: false, label: "Workspace only" },{ partnerVisible: true, label: "Workspace and partner" },@@ -114,11 +119,11 @@ export function SubmittedLeadComments({ leadId }: { leadId: string }) {}sendButtonText="Post"inputClassName={cn(- "m-1 rounded-lg border transition-colors",- partnerVisible- ? "border-orange-200 bg-orange-50"- : "border-transparent",+ COMMENT_INPUT_CLASSNAME,+ partnerVisible &&+ "border-orange-200 bg-orange-50 [&>[aria-hidden]]:from-orange-50 [&_.is-empty]:before:text-amber-950/50",)}+ toolbarClassName={COMMENT_TOOLBAR_CLASSNAME}actions={<VisibilitySelectorpartnerVisible={partnerVisible}@@ -190,9 +195,9 @@ function VisibilitySelector({onClick={() => setOpenPopover(!openPopover)}className="text-content-emphasis hover:bg-bg-muted data-[state=open]:bg-bg-muted flex h-8 items-center gap-2 rounded-lg px-2.5 text-sm font-medium transition-colors">- <Eye className="size-4 shrink-0" />+ <Eye className="size-3.5 shrink-0" /><span className="whitespace-nowrap">{selected.label}</span>- <ChevronDown className="text-content-subtle size-3.5 shrink-0" />+ <ChevronDown className="text-content-subtle size-2.5 shrink-0" /></button></Popover>);