pouncejs
Version:
A collection of UI components from Panther labs
26 lines (25 loc) • 1.27 kB
TypeScript
import React from 'react';
export interface ControlledAlertProps {
/** The main text of the the alert */
title?: React.ReactNode;
/** Whether the alert is visible */
open: boolean;
/** When the alert is discardable, this is the callback that gets fired on discard */
onClose: () => void;
/** The style of the ControlledAlert */
variant?: 'success' | 'info' | 'warning' | 'error' | 'default';
/** The background style of the ControlledAlert */
variantBackgroundStyle?: 'solid' | 'transparent';
/** The page position of the Alert (default is bottom left) **/
position?: 'top-left' | 'top-middle' | 'top-right' | 'bottom-left' | 'bottom-middle' | 'bottom-right';
/** A secondary text to further explain the title */
description?: React.ReactNode;
/** A react component containing available actions for the ControlledAlert */
actions?: React.ReactNode | ((helpers: {
close: () => void;
}) => React.ReactNode);
/** Whether the ControlledAlert should have a close button in order to remove itself */
discardable?: boolean;
}
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ControlledAlertProps & React.RefAttributes<HTMLDivElement>>>;
export default _default;