synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
36 lines • 1.25 kB
TypeScript
import { AlertProps } from '@mui/material';
import { MouseEventHandler, ReactNode } from 'react';
import './FullWidthAlert.scss';
export type AlertButtonConfig = {
text: string;
isDisabled?: boolean;
tooltipText?: string;
} & (// "onClick" or "href", but not both
{
onClick?: MouseEventHandler<HTMLButtonElement>;
} | {
href?: string;
});
export type FullWidthAlertVariant = 'warning' | 'info' | 'danger' | 'success';
export interface FullWidthAlertProps {
variant?: FullWidthAlertVariant;
show?: boolean;
title?: string;
description?: ReactNode;
primaryButtonConfig?: AlertButtonConfig;
secondaryButtonConfig?: AlertButtonConfig;
tertiaryButtonConfig?: AlertButtonConfig;
onClose?: () => void;
autoCloseAfterDelayInSeconds?: number;
isGlobal?: boolean;
icon?: ReactNode;
sx?: AlertProps['sx'];
globalAlertSx?: AlertProps['sx'];
}
/**
* Nav bar item, displayed when files have been added to the Download List.
* This must be configured with the URL of a page dedicated to showing the Download List.
*/
declare function FullWidthAlert(props: FullWidthAlertProps): import("react/jsx-runtime").JSX.Element;
export default FullWidthAlert;
//# sourceMappingURL=FullWidthAlert.d.ts.map