Skip to content

Commit

Permalink
feat(Popconfirm): make title bold and add description prop (#39250)
Browse files Browse the repository at this point in the history
* feat(popconfirm): make title bold and add description prop

* feat(popconfirm): make title bold and add description prop(update demos)

* feat(popconfirm): make title bold and add description prop(the update of demos translation)

* feat(popconfirm): make title bold and add description prop(the update of snapshot)

* feat(popconfirm): make title bold and add description prop(the update of popconfirm md)

* feat(popconfirm): make title bold and add description prop(the update of popconfirm md)2

* feat(popconfirm): make title bold and add description prop(run all test.ts.snaps and update popconfirm)
  • Loading branch information
xhh0223 committed Dec 8, 2022
1 parent c2afa97 commit 451d2f6
Show file tree
Hide file tree
Showing 18 changed files with 257 additions and 45 deletions.
2 changes: 1 addition & 1 deletion components/modal/index.en-US.md
Expand Up @@ -98,7 +98,7 @@ The items listed above are all functions, expecting a settings object as paramet
| closable | Whether a close (x) button is visible on top right of the confirm dialog or not | boolean | false | 4.9.0 |
| closeIcon | Custom close icon | ReactNode | undefined | 4.9.0 |
| content | Content | ReactNode | - | |
| footer | Footer content, set as `footer: null` when you don't need default buttons | ReactNode | - | 5.1.0 |
| footer | Footer content, set as `footer: null` when you don't need default buttons | ReactNode | - | 5.1.0 |
| getContainer | Return the mount node for Modal | HTMLElement \| () => HTMLElement \| Selectors \| false | document.body | |
| icon | Custom icon | ReactNode | <QuestionCircle /> | |
| keyboard | Whether support press esc to close | boolean | true | |
Expand Down
2 changes: 1 addition & 1 deletion components/modal/index.zh-CN.md
Expand Up @@ -101,7 +101,7 @@ demo:
| closable | 是否显示右上角的关闭按钮 | boolean | false | 4.9.0 |
| closeIcon | 自定义关闭图标 | ReactNode | undefined | 4.9.0 |
| content | 内容 | ReactNode | - | |
| footer | 底部内容,当不需要默认底部按钮时,可以设为 `footer: null` | ReactNode | - | 5.1.0 |
| footer | 底部内容,当不需要默认底部按钮时,可以设为 `footer: null` | ReactNode | - | 5.1.0 |
| getContainer | 指定 Modal 挂载的 HTML 节点, false 为挂载在当前 dom | HTMLElement \| () => HTMLElement \| Selectors \| false | document.body | |
| icon | 自定义图标 | ReactNode | <QuestionCircle /> | |
| keyboard | 是否支持键盘 esc 关闭 | boolean | true | |
Expand Down
13 changes: 12 additions & 1 deletion components/popconfirm/PurePanel.tsx
Expand Up @@ -29,6 +29,7 @@ export interface OverlayProps
| 'okType'
| 'showCancel'
| 'title'
| 'description'
> {
prefixCls: string;
close?: Function;
Expand All @@ -42,6 +43,7 @@ export const Overlay: React.FC<OverlayProps> = (props) => {
okButtonProps,
cancelButtonProps,
title,
description,
cancelText,
okText,
okType = 'primary',
Expand All @@ -60,8 +62,17 @@ export const Overlay: React.FC<OverlayProps> = (props) => {
<div className={`${prefixCls}-inner-content`}>
<div className={`${prefixCls}-message`}>
{icon && <span className={`${prefixCls}-message-icon`}>{icon}</span>}
<div className={`${prefixCls}-message-title`}>{getRenderPropValue(title)}</div>
<div
className={classNames(`${prefixCls}-message-title`, {
[`${prefixCls}-message-title-only`]: !!description,
})}
>
{getRenderPropValue(title)}
</div>
</div>
{description && (
<div className={`${prefixCls}-description`}>{getRenderPropValue(description)}</div>
)}
<div className={`${prefixCls}-buttons`}>
{showCancel && (
<Button onClick={onCancel} size="small" {...cancelButtonProps}>
Expand Down

0 comments on commit 451d2f6

Please sign in to comment.