first commit
This commit is contained in:
17
apps/frontend/components/ui/toast.tsx
Normal file
17
apps/frontend/components/ui/toast.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
'use client';
|
||||
|
||||
import * as ToastPrimitive from '@radix-ui/react-toast';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
export const ToastProvider = ToastPrimitive.Provider;
|
||||
export const ToastViewport = (props: React.ComponentProps<typeof ToastPrimitive.Viewport>) => (
|
||||
<ToastPrimitive.Viewport className="fixed bottom-4 right-4 z-50 flex max-w-sm flex-col gap-2" {...props} />
|
||||
);
|
||||
|
||||
export function Toast({ className, ...props }: React.ComponentProps<typeof ToastPrimitive.Root>) {
|
||||
return <ToastPrimitive.Root className={cn('rounded-2xl bg-[#20212b] p-4 text-sm text-white shadow-xl', className)} {...props} />;
|
||||
}
|
||||
|
||||
export function ToastTitle({ className, ...props }: React.ComponentProps<typeof ToastPrimitive.Title>) {
|
||||
return <ToastPrimitive.Title className={cn('font-semibold', className)} {...props} />;
|
||||
}
|
||||
Reference in New Issue
Block a user