From cc0e305e889daa5b03b4dde82599854082c4717b Mon Sep 17 00:00:00 2001 From: sirineJ <112706079+sirineJ@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:33:40 +0100 Subject: [PATCH] fix types --- packages/circuit-ui/components/Dialog/ModalContext.tsx | 4 +--- .../components/NotificationModal/useNotificationModal.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/circuit-ui/components/Dialog/ModalContext.tsx b/packages/circuit-ui/components/Dialog/ModalContext.tsx index c333cf5c6d..3abafae7c2 100644 --- a/packages/circuit-ui/components/Dialog/ModalContext.tsx +++ b/packages/circuit-ui/components/Dialog/ModalContext.tsx @@ -23,12 +23,10 @@ import { useState, } from 'react'; -import type { Optional } from '../../types/util.js'; - import type { DialogProps } from './Dialog.js'; import type { ModalDialogComponent } from './createUseModalDialog.js'; -export type SetModalArgs = Optional; +export type SetModalArgs = Omit; // keep initial state compatible with the old version of this component export type ModalState = SetModalArgs & { diff --git a/packages/circuit-ui/components/NotificationModal/useNotificationModal.ts b/packages/circuit-ui/components/NotificationModal/useNotificationModal.ts index db583b3732..ecbcf1559b 100644 --- a/packages/circuit-ui/components/NotificationModal/useNotificationModal.ts +++ b/packages/circuit-ui/components/NotificationModal/useNotificationModal.ts @@ -15,6 +15,10 @@ import { createUseModalDialog } from '../Dialog/createUseModalDialog.js'; -import { NotificationModal } from './NotificationModal.js'; +import { + NotificationModal, + type NotificationModalProps, +} from './NotificationModal.js'; -export const useNotificationModal = createUseModalDialog(NotificationModal); +export const useNotificationModal = + createUseModalDialog(NotificationModal);