feat(web): refactor sign-in button and composer components to use Button component

This commit is contained in:
Anish Sarkar 2026-05-26 18:27:02 +05:30
parent 9cd3de9ec1
commit 701ae800b4
2 changed files with 9 additions and 6 deletions

View file

@ -866,7 +866,7 @@ const Composer: FC = () => {
onDocumentRemove={handleDocumentRemove} onDocumentRemove={handleDocumentRemove}
onSubmit={handleSubmit} onSubmit={handleSubmit}
onKeyDown={handleKeyDown} onKeyDown={handleKeyDown}
className="min-h-[24px] **:data-slate-placeholder:font-semibold" className="min-h-[24px] **:data-slate-placeholder:font-normal"
/> />
</div> </div>
<ComposerAction isBlockedByOtherUser={isBlockedByOtherUser} /> <ComposerAction isBlockedByOtherUser={isBlockedByOtherUser} />
@ -1121,9 +1121,10 @@ const ComposerAction: FC<ComposerActionProps> = ({ isBlockedByOtherUser = false
> >
<div className="flex w-full items-center gap-3 px-4 py-2 hover:bg-accent hover:text-accent-foreground transition-colors"> <div className="flex w-full items-center gap-3 px-4 py-2 hover:bg-accent hover:text-accent-foreground transition-colors">
<CollapsibleTrigger asChild> <CollapsibleTrigger asChild>
<button <Button
type="button" type="button"
className="flex min-w-0 flex-1 items-center gap-3 text-left" variant="ghost"
className="h-auto min-w-0 flex-1 justify-start gap-3 p-0 text-left hover:bg-transparent hover:text-inherit"
> >
{iconInfo ? ( {iconInfo ? (
<Image <Image
@ -1145,7 +1146,7 @@ const ComposerAction: FC<ComposerActionProps> = ({ isBlockedByOtherUser = false
) : ( ) : (
<ChevronRight className="size-4 shrink-0 text-muted-foreground" /> <ChevronRight className="size-4 shrink-0 text-muted-foreground" />
)} )}
</button> </Button>
</CollapsibleTrigger> </CollapsibleTrigger>
<Switch <Switch
checked={!allDisabled} checked={!allDisabled}

View file

@ -2,6 +2,7 @@
import Link from "next/link"; import Link from "next/link";
import { useState } from "react"; import { useState } from "react";
import { Button } from "@/components/ui/button";
import { AUTH_TYPE, BACKEND_URL } from "@/lib/env-config"; import { AUTH_TYPE, BACKEND_URL } from "@/lib/env-config";
import { trackLoginAttempt } from "@/lib/posthog/events"; import { trackLoginAttempt } from "@/lib/posthog/events";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
@ -74,8 +75,9 @@ export const SignInButton = ({ variant = "desktop" }: SignInButtonProps) => {
if (isGoogleAuth) { if (isGoogleAuth) {
return ( return (
<button <Button
type="button" type="button"
variant="ghost"
onClick={handleGoogleLogin} onClick={handleGoogleLogin}
disabled={isRedirecting} disabled={isRedirecting}
className={cn( className={cn(
@ -85,7 +87,7 @@ export const SignInButton = ({ variant = "desktop" }: SignInButtonProps) => {
> >
<GoogleLogo className="h-4 w-4" /> <GoogleLogo className="h-4 w-4" />
<span>Sign In</span> <span>Sign In</span>
</button> </Button>
); );
} }