mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
chore: update logic
This commit is contained in:
@@ -2,7 +2,6 @@ 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';
|
||||
@@ -47,18 +46,19 @@ export const Footer: React.FC<
|
||||
const [locale] = useLocale('Modal', getConfirmLocale());
|
||||
|
||||
return (
|
||||
<DisabledContextProvider disabled={false}>
|
||||
<Button onClick={onCancel} {...cancelButtonProps}>
|
||||
<>
|
||||
<Button onClick={onCancel} disabled={false} {...cancelButtonProps}>
|
||||
{cancelText || locale?.cancelText}
|
||||
</Button>
|
||||
<Button
|
||||
{...convertLegacyProps(okType)}
|
||||
disabled={false}
|
||||
loading={confirmLoading}
|
||||
onClick={onOk}
|
||||
{...okButtonProps}
|
||||
>
|
||||
{okText || locale?.okText}
|
||||
</Button>
|
||||
</DisabledContextProvider>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user