Skip to content

Commit

Permalink
Remove useTheme in useModal (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
toddkao committed Sep 13, 2024
1 parent c5750f3 commit 56b7814
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/widget-v2/src/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export const useModal = <T extends ModalProps>(
modal?: FC<T>,
initialArgs?: Partial<T>
) => {
const theme = useTheme();
const [numberOfModalsOpen, setNumberOfModalsOpen] = useAtom(
numberOfModalsOpenAtom
);
Expand All @@ -85,7 +84,6 @@ export const useModal = <T extends ModalProps>(
...modalInstance,
show: (showArgs?: Partial<T & ModalProps>) => {
modalInstance.show({
theme,
stackedModal: numberOfModalsOpen > 0,
...showArgs,
} as Partial<T>);
Expand All @@ -100,11 +98,11 @@ export const useModal = <T extends ModalProps>(
modalInstance.hide();
},
}),
[modalInstance, setNumberOfModalsOpen, theme, numberOfModalsOpen]
[modalInstance, setNumberOfModalsOpen, numberOfModalsOpen]
);
};

const StyledOverlay = styled(Dialog.Overlay)<{
const StyledOverlay = styled(Dialog.Overlay) <{
drawer?: boolean;
invisible?: boolean;
}>`
Expand Down

0 comments on commit 56b7814

Please sign in to comment.