@withjoy/joykit
Version:
UI Component Library for Joy web
31 lines (30 loc) • 1.06 kB
TypeScript
import React from 'react';
import { IconSource, Icon } from '../Icon';
import { BaseComponentProps } from '../../../core/common/props';
export interface MessageCardProps extends BaseComponentProps {
children?: never;
/**
* When true, show either the default indicator or render a custom component.
*
* This will be placed in the upper right corner.
*
* Defaults to false;
*/
closeIcon?: boolean | React.ComponentType<any>;
/**
* Icon to be rendered in the top left corner.
*/
icon?: IconSource | React.ComponentType<Icon>;
title?: string;
message: string;
/**
* The amount of time that this card should be active.
* After the specified time has elapsed, the `onClose` callback will be called.
*
* Note: `onClose` should be provided along with `duration` .
*/
duration?: never;
onClose?: React.MouseEventHandler<HTMLDivElement>;
variant?: 'info' | 'danger';
}
export declare const MessageCard: React.FC<MessageCardProps>;