notifications
The notification will inform the user when they have a new
default alert
3
import { Notification } from "dialui-components";
export const MyComponent = () => {
const totalNotifications = 1;
return (
<Notification hasNotification={totalNotifications > 0}>
{totalNotifications > 10 ? "+99" : totalNotifications.toString()}
</Notification>
);
};
Default Props:
- hasNotification= required;
- children= required;
- backgroundColor= 'red';
- size= 'md';
Props:
- hasNotification: boolean;
- children: string;
- backgroundColor?: BasicColors;
- size?: | 'sm' | 'md' | 'lg';
Colors:
The value of the 'colors' property allows you to change the background color of the notification.
- BasicColors:
- | 'blue' | 'red' | 'yellow' | 'green' | 'orange'
- | 'gray' | 'white' | 'purple' | 'pink' | 'black