UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

75 lines (74 loc) 2.28 kB
/** * MSKCC DSM 2021, 2024 */ import React, { type ReactNode, type MouseEvent, type Ref } from 'react'; interface SecondaryButtonProps { buttonText: ReactNode; onClick(evt: MouseEvent): void; } export interface SecondaryButtonSetProps { closeModal(evt: MouseEvent): void; onRequestClose(evt: MouseEvent): void; secondaryButtonText?: string; secondaryButtons?: [SecondaryButtonProps, SecondaryButtonProps]; secondaryClassName?: string; } export interface ModalFooterProps { /** * Pass in content that will be rendered in the Modal Footer */ children: ReactNode; /** * Specify a custom className to be applied to the Modal Footer container */ className?: string; /** * Specify an optional function that is called whenever the modal is closed */ closeModal?(evt: MouseEvent): void; /** * Specify whether the primary button should be replaced with danger button. * Note that this prop is not applied if you render primary/danger button by yourself */ danger?: boolean; /** * The `ref` callback for the primary button. */ inputref?: Ref<HTMLButtonElement>; /** * Specify an optional function for when the modal is requesting to be * closed */ onRequestClose?(): void; /** * Specify an optional function for when the modal is requesting to be * submitted */ onRequestSubmit?(): void; /** * Specify whether the primary button should be disabled */ primaryButtonDisabled?: boolean; /** * Specify the text for the primary button */ primaryButtonText?: string; /** * Specify a custom className to be applied to the primary button */ primaryClassName?: string; /** * Specify the text for the secondary button */ secondaryButtonText?: string; /** * Specify an array of config objects for secondary buttons */ secondaryButtons?: [SecondaryButtonProps, SecondaryButtonProps]; /** * Specify a custom className to be applied to the secondary button */ secondaryClassName?: string; } export declare const ModalFooter: React.ForwardRefExoticComponent<ModalFooterProps & React.RefAttributes<HTMLElement>>; export {};