@spaced-out/ui-design-system
Version:
Sense UI components library
45 lines • 1.52 kB
TypeScript
import * as React from 'react';
import type { Flow } from 'flow-to-typescript-codemod';
import type { AlertSemanticType } from '../../types/common';
import type { ColorTypes } from '../../types/typography';
import type { IconType } from '../../components/Icon';
type ClassNames = Readonly<{
wrapper?: string;
alertText?: string;
actionContainer?: string;
icon?: string;
contentContainer?: string;
}>;
type InContextAlertBaseProps = {
classNames?: ClassNames;
testId?: string;
} & ({
dismissable?: true;
onCloseClick?: (e: React.SyntheticEvent<HTMLElement>) => unknown;
selfDismiss?: boolean;
} | {
dismissable?: false;
onCloseClick?: never;
selfDismiss?: never;
}) & {
children?: string;
actionText?: string;
onAction?: React.MouseEventHandler<HTMLAnchorElement>;
actionTextColor?: ColorTypes;
};
export interface InContextAlertProps extends Omit<InContextAlertBaseProps, 'semantic' | 'leftIconName' | 'leftIconType'> {
semantic?: AlertSemanticType;
leftIconName?: string;
leftIconType?: IconType;
disableAction?: boolean;
}
export declare const AlertIcon: ({ semantic, leftIconName, leftIconType, iconClassName, testId, }: {
semantic: AlertSemanticType;
leftIconName: string;
leftIconType?: IconType;
iconClassName?: string;
testId?: string;
}) => React.JSX.Element;
export declare const InContextAlert: Flow.AbstractComponent<InContextAlertProps, HTMLDivElement>;
export {};
//# sourceMappingURL=InContextAlert.d.ts.map