diff --git a/changelog.md b/changelog.md index 3d1bcbb84..67923a0c6 100644 --- a/changelog.md +++ b/changelog.md @@ -7,3 +7,5 @@ date 相关组件: dayjs, UI 变动 steps: add responsive、percent collapse: add ghost、collapsible + +popconfirm: add cancelButton、okButton、esc 隐藏 diff --git a/components/_util/transition.tsx b/components/_util/transition.tsx index 0427e304e..d44295e83 100644 --- a/components/_util/transition.tsx +++ b/components/_util/transition.tsx @@ -153,6 +153,13 @@ const collapseMotion = (style: Ref, className: Ref): CSSM }; }; -export { Transition, TransitionGroup, collapseMotion }; +const getTransitionName = (rootPrefixCls: string, motion: string, transitionName?: string) => { + if (transitionName !== undefined) { + return transitionName; + } + return `${rootPrefixCls}-${motion}`; +}; + +export { Transition, TransitionGroup, collapseMotion, getTransitionName }; export default Transition; diff --git a/components/popconfirm/__tests__/__snapshots__/index.test.js.snap b/components/popconfirm/__tests__/__snapshots__/index.test.js.snap index 31311e6eb..b5d617d4c 100644 --- a/components/popconfirm/__tests__/__snapshots__/index.test.js.snap +++ b/components/popconfirm/__tests__/__snapshots__/index.test.js.snap @@ -5,7 +5,7 @@ exports[`Popconfirm should show overlay when trigger is clicked 1`] = `