@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
27 lines • 1.3 kB
TypeScript
import React from 'react';
import { DefaultProps } from '../../theme';
import useStyles from './Notification.styles';
export declare type NotificationStylesNames = Exclude<keyof ReturnType<typeof useStyles>, 'withIcon'>;
export interface NotificationProps extends DefaultProps<NotificationStylesNames>, Omit<React.ComponentPropsWithoutRef<'div'>, 'title'> {
/** Called when close button is clicked */
onClose(): void;
/** Notification line or icon color */
color?: string;
/** Notification icon, replaces color line */
icon?: React.ReactNode;
/** Notification title, displayed before body */
title?: React.ReactNode;
/** Notification body, place main text here */
children?: React.ReactNode;
/** Replaces colored line or icon with Loader component */
loading?: boolean;
/** Removes close button */
disallowClose?: boolean;
/** Props spread to close button */
closeButtonProps?: Record<string, any>;
}
export declare function Notification({ className, style, color, loading, disallowClose, title, icon, children, onClose, closeButtonProps, themeOverride, classNames, styles, ...others }: NotificationProps): JSX.Element;
export declare namespace Notification {
var displayName: string;
}
//# sourceMappingURL=Notification.d.ts.map