Files
ox_lib/web/src/typings/notifications.ts
RrybaN 9d08560e91 feat(notify): show duration (#542)
* feat(notify): add option to show duration

lib.notify new option
`showDuration?: boolean -- Option to show duration bar`

* fix(notify): allow icon color using hexadecimal values

* chore(notify): show duration to default and added tinycolor2 for supporting available color formats

* feat(notify): define interface for showDuration
2024-04-12 17:15:57 +02:00

20 lines
539 B
TypeScript

import { ToastPosition } from 'react-hot-toast';
import { IconProp } from '@fortawesome/fontawesome-svg-core';
import { Sx } from '@mantine/core';
import { IconAnimation } from '../components/LibIcon';
export interface NotificationProps {
style?: Sx;
description?: string;
title?: string;
duration?: number;
showDuration?: boolean;
icon?: IconProp;
iconColor?: string;
iconAnimation?: IconAnimation;
position?: ToastPosition | 'top' | 'bottom';
id?: number | string;
type?: string;
alignIcon?: 'top' | 'center';
}