Files
decky-frontend-lib/src/deck-components/Button.tsx

21 lines
582 B
TypeScript
Raw Normal View History

2022-09-09 16:15:51 -04:00
import { CSSProperties, FC } from 'react';
2022-05-10 23:38:10 +02:00
import { CommonUIModule } from '../webpack';
export interface DialogButtonProps {
label?: string;
2022-09-09 16:15:51 -04:00
style: CSSProperties;
className?: string;
noFocusRing?: boolean;
description?: string;
layout?: 'below';
onClick?(e: MouseEvent): void;
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'),
) as FC<DialogButtonProps>;