Deno plugins (#42)

Switch from BoaJS to Deno core
This commit is contained in:
Gregory Schier
2024-06-07 10:47:41 -07:00
committed by GitHub
parent f43b38c893
commit acfc254a58
32 changed files with 1378 additions and 5663 deletions

View File

@@ -7,12 +7,22 @@ import { Alert } from './Alert';
export function useAlert() {
const dialog = useDialog();
return useCallback(
({ id, title, body }: { id: string; title: DialogProps['title']; body: AlertProps['body'] }) =>
({
id,
title,
body,
size = 'sm',
}: {
id: string;
title: DialogProps['title'];
body: AlertProps['body'];
size?: DialogProps['size'];
}) =>
dialog.show({
id,
title,
hideX: true,
size: 'sm',
size,
render: ({ hide }) => Alert({ onHide: hide, body }),
}),
// eslint-disable-next-line react-hooks/exhaustive-deps