@abgov/react-components
Version:
Government of Alberta - UI components for React
43 lines (42 loc) • 1.44 kB
TypeScript
import { GoabModalCalloutVariant, GoabModalRole, GoabModalTransition } from '@abgov/ui-components-common';
import { ReactElement, ReactNode, RefObject, JSX } from 'react';
interface WCProps {
ref: RefObject<HTMLElement | null>;
heading?: ReactNode;
open?: string;
maxwidth?: string;
closable: string;
/**
* @deprecated The role property is deprecated and will be removed in a future version.
* The modal will always use role="dialog".
*/
role?: GoabModalRole;
transition?: GoabModalTransition;
calloutvariant?: GoabModalCalloutVariant;
testid?: string;
}
declare module "react" {
namespace JSX {
interface IntrinsicElements {
"goa-modal": WCProps & React.HTMLAttributes<HTMLElement>;
}
}
}
export interface GoabModalProps {
heading?: ReactNode;
maxWidth?: string;
actions?: ReactElement<any>;
onClose?: () => void;
transition?: GoabModalTransition;
children?: ReactNode;
open?: boolean;
calloutVariant?: GoabModalCalloutVariant;
testId?: string;
/**
* @deprecated The role property is deprecated and will be removed in a future version.
* The modal will always use role="dialog".
*/
role?: GoabModalRole;
}
export declare function GoabModal({ heading, children, maxWidth, open, actions, transition, calloutVariant, onClose, testId, }: GoabModalProps): JSX.Element;
export default GoabModal;