2022-09-18 15:17:56 -04:00
|
|
|
import { CSSProperties, FC, RefAttributes } from 'react';
|
2022-05-10 23:38:10 +02:00
|
|
|
|
|
|
|
|
import { CommonUIModule } from '../webpack';
|
2022-09-22 17:33:08 -05:00
|
|
|
import { FooterLegendProps } from './FooterLegend';
|
2022-05-10 23:38:10 +02:00
|
|
|
|
2022-09-22 17:33:08 -05:00
|
|
|
export interface DialogButtonProps extends RefAttributes<HTMLDivElement>, FooterLegendProps {
|
2022-09-18 15:01:40 -04:00
|
|
|
label?: string;
|
2022-09-18 15:17:56 -04:00
|
|
|
style?: CSSProperties;
|
2022-05-25 20:26:30 -04:00
|
|
|
className?: string;
|
|
|
|
|
noFocusRing?: boolean;
|
2022-09-18 15:01:40 -04:00
|
|
|
description?: string;
|
|
|
|
|
layout?: 'below';
|
2022-05-25 20:26:30 -04:00
|
|
|
onClick?(e: MouseEvent): void;
|
2022-09-18 15:01:40 -04:00
|
|
|
disabled?: boolean;
|
|
|
|
|
bottomSeparator?: boolean;
|
2022-05-10 23:38:10 +02:00
|
|
|
}
|
|
|
|
|
|
2022-05-26 13:28:35 +02:00
|
|
|
export const DialogButton = Object.values(CommonUIModule).find(
|
2022-05-26 10:15:32 +02:00
|
|
|
(mod: any) =>
|
|
|
|
|
mod?.render?.toString()?.includes('Object.assign({type:"button"') &&
|
|
|
|
|
mod?.render?.toString()?.includes('DialogButton'),
|
2022-09-18 15:01:40 -04:00
|
|
|
) as FC<DialogButtonProps>;
|