Notification

This is a Notification component.

User Avatar

Hi there! I'm John Doe from Solaris team

Installation

1. Dependencies

npm install clsx tailwind-merge

2. Paste inside @/lib/utils.ts

import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";

export function cn(...inputs: Parameters<typeof clsx>) {
  return twMerge(clsx(...inputs));
}

3. Copy Notification Code

Loading...

Copy Notification Code

Notification Props

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeYesundefinedThe content of the notification.
classNamestringNoundefinedAdditional class names for styling.

Avatar Props

NameTypeRequiredDefaultDescription
imgUrlstringYesundefinedThe URL of the user's avatar image.
classNamestringNoundefinedAdditional class names for styling.

Message Props

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeYesundefinedThe message content.
classNamestringNoundefinedAdditional class names for styling.

ReplyButton Props

NameTypeRequiredDefaultDescription
onClick() => voidYesundefinedThe callback to trigger when the reply button is clicked.
classNamestringNoundefinedAdditional class names for styling.