@spaced-out/ui-design-system
Version:
Sense UI components library
40 lines • 1.31 kB
TypeScript
import * as React from 'react';
import type { Flow } from 'flow-to-typescript-codemod';
import type { IconType } from '../../components/Icon';
export declare const NOTIFICATION_SEMANTIC: Readonly<{
success: "success";
information: "information";
danger: "danger";
}>;
type ClassNames = Readonly<{
wrapper?: string;
text?: string;
}>;
export type NotificationSemanticType = (typeof NOTIFICATION_SEMANTIC)[keyof typeof NOTIFICATION_SEMANTIC];
interface BaseNotificationProps {
classNames?: ClassNames;
semantic: NotificationSemanticType;
iconLeftName?: string;
iconLeftType?: IconType;
dismissable?: boolean;
children?: string;
onCloseClick?: React.MouseEventHandler<HTMLDivElement>;
testId?: string;
}
type NotificationBaseProps = BaseNotificationProps & {
classNames?: ClassNames;
} & ({
dismissable: true;
onCloseClick?: React.MouseEventHandler<HTMLDivElement>;
selfDismiss?: boolean;
} | {
dismissable?: false;
selfDismiss?: never;
onCloseClick?: never;
});
export interface NotificationProps extends Omit<NotificationBaseProps, 'semantic'> {
semantic: NotificationSemanticType;
}
export declare const Notification: Flow.AbstractComponent<NotificationProps, HTMLDivElement>;
export {};
//# sourceMappingURL=Notification.d.ts.map