Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
sirineJ committed Dec 9, 2024
1 parent daed6d3 commit cc0e305
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 1 addition & 3 deletions packages/circuit-ui/components/Dialog/ModalContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<DialogProps, 'open'>;
export type SetModalArgs = Omit<DialogProps, 'open'>;

// keep initial state compatible with the old version of this component
export type ModalState<T extends DialogProps> = SetModalArgs & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<NotificationModalProps>(NotificationModal);

0 comments on commit cc0e305

Please sign in to comment.