Skip to content

Commit

Permalink
update formatting with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
pfo-omicsstudio committed Nov 9, 2024
1 parent df1fc76 commit 7143ca9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions packages/@mantine/modals/src/Modals.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,7 @@ const AsyncProcessingModal = ({
<Text size="sm" c="dimmed">
{innerProps.modalBody}
</Text>
<Button
w="100%"
mt="md"
disabled={innerProps.disabled}
onClick={() => context.closeModal(id)}
>
<Button w="100%" mt="md" disabled={innerProps.disabled} onClick={() => context.closeModal(id)}>
Close
</Button>
</>
Expand All @@ -202,7 +197,10 @@ function UpdateContextModal() {
const handleOpenAsyncConfirmModal = () => {
const modalId = modals.openContextModal('asyncProcessing', {
title: 'Processing...',
innerProps: { modalBody: 'You cannot close the modal during this operation.', disabled: true },
innerProps: {
modalBody: 'You cannot close the modal during this operation.',
disabled: true,
},
closeButtonProps: { disabled: true },
closeOnEscape: false,
closeOnClickOutside: false,
Expand All @@ -216,7 +214,10 @@ function UpdateContextModal() {
closeButtonProps: { disabled: false },
closeOnEscape: true,
closeOnClickOutside: true,
innerProps: { modalBody: 'Processing complete. You can now close the modal.', disabled: false },
innerProps: {
modalBody: 'Processing complete. You can now close the modal.',
disabled: false,
},
});
}, 2000);
};
Expand Down Expand Up @@ -264,9 +265,7 @@ function UpdateModal() {

export function UpdateExample() {
return (
<ModalsProvider
modals={{ asyncProcessing: AsyncProcessingModal }}
>
<ModalsProvider modals={{ asyncProcessing: AsyncProcessingModal }}>
<Group p={40}>
<UpdateModal />
<UpdateContextModal />
Expand Down
2 changes: 1 addition & 1 deletion packages/@mantine/modals/src/reducer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ModalSettings, ModalState, OpenContextModal} from './context';
import { ModalSettings, ModalState, OpenContextModal } from './context';

interface ModalsState {
modals: ModalState[];
Expand Down

0 comments on commit 7143ca9

Please sign in to comment.