Skip to content

Commit

Permalink
fix: update disabled logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 committed Jun 16, 2023
1 parent 730c37e commit 07ec788
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/modal/shared.tsx
Expand Up @@ -2,6 +2,7 @@ import CloseOutlined from '@ant-design/icons/CloseOutlined';
import React from 'react';
import Button from '../button';
import { convertLegacyProps } from '../button/button';
import { DisabledContextProvider } from '../config-provider/DisabledContext';
import { useLocale } from '../locale';
import type { ModalProps } from './interface';
import { getConfirmLocale } from './locale';
Expand Down Expand Up @@ -46,7 +47,7 @@ export const Footer: React.FC<
const [locale] = useLocale('Modal', getConfirmLocale());

return (
<>
<DisabledContextProvider disabled={false}>
<Button onClick={onCancel} {...cancelButtonProps}>
{cancelText || locale?.cancelText}
</Button>
Expand All @@ -58,6 +59,6 @@ export const Footer: React.FC<
>
{okText || locale?.okText}
</Button>
</>
</DisabledContextProvider>
);
};

0 comments on commit 07ec788

Please sign in to comment.