Skip to content

Commit

Permalink
fix: trigger on avatar alert dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
matyson committed Jan 30, 2024
1 parent 53ee507 commit 18cb397
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/avatar-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from './ui/alert-dialog';
import { Avatar, AvatarFallback, AvatarImage } from './ui/avatar';

Expand Down Expand Up @@ -76,6 +77,18 @@ export function AvatarDrop() {
if (open) {
return (
<AlertDialog open={open} onOpenChange={setOpen}>
<AlertDialogTrigger asChild>
<Button variant="outline" size="icon" title="user info">
<Avatar className="h-6 w-6">
<AvatarImage
src="https://source.boringavatars.com/bauhaus"
alt="@user"
/>
<AvatarFallback>oi</AvatarFallback>
</Avatar>
<span className="sr-only">User info</span>
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
Expand Down

0 comments on commit 18cb397

Please sign in to comment.