Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Popconfirm): button props propagation #2361

Merged
merged 2 commits into from
Jul 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/popconfirm/Popcontent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import isString from 'lodash/isString';
import classNames from 'classnames';
import { InfoCircleFilledIcon as TdInfoCircleFilledIcon } from 'tdesign-icons-react';
import Button from '../button';
import Button, { ButtonProps } from '../button';
import noop from '../_util/noop';
import useConfig from '../hooks/useConfig';
import useGlobalIcon from '../hooks/useGlobalIcon';
Expand Down Expand Up @@ -71,6 +71,7 @@ const Popcontent = (props: PopconfirmProps & { onClose?: (context: PopconfirmVis
onClose({ e, trigger: 'cancel' });
onCancel({ e });
}}
{...(typeof cancelBtn === 'object' ? { ...(cancelBtn as ButtonProps) } : {})}
uyarn marked this conversation as resolved.
Show resolved Hide resolved
>
{isString(cancelBtn) && cancelBtn}
</Button>
Expand Down Expand Up @@ -99,6 +100,7 @@ const Popcontent = (props: PopconfirmProps & { onClose?: (context: PopconfirmVis
onClose({ e, trigger: 'confirm' });
onConfirm({ e });
}}
{...(typeof confirmBtn === 'object' ? { ...(confirmBtn as ButtonProps) } : {})}
>
{isString(confirmBtn) && confirmBtn}
</Button>
Expand Down