AlignUI MCP
Componentes

Notification Provider

AlignUI Notification Provider, a helper shipped with the official docs.

Instalación

$npx shadcn@latest add @alignui/notification-provider

Código

components/ui/notification-provider.tsx
'use client';

import * as Notification from '@/components/ui/notification';
import { useNotification } from '@/hooks/use-notification';

const NotificationProvider = () => {
  const { notifications } = useNotification();

  return (
    <Notification.Provider>
      {notifications.map(({ id, ...rest }) => {
        return <Notification.Root key={id} {...rest} />;
      })}
      <Notification.Viewport />
    </Notification.Provider>
  );
};

export { NotificationProvider };