RestoUI contains foundational Resto UI component libraries for shipping new features faster.
Install the resto-ui package with NPM:
npm install resto-ui
Display a notification message at any of the four corners of the viewport
import { Notification } from 'resto-ui';
Notification.open({
duration: 3,
title: 'Title',
description: 'Description',
type: 'success',
});
Duration
can be used to specify how long the notification stays open. Default value is 3 seconds. If you set the value to 0, the notification box will never close automatically.
A notification box can appear from the topLeft topRight bottomLeft or bottomRight
of the viewport via position
.