Skip to content

Commit

Permalink
feat: Popconfirm title and description props(change the title display…
Browse files Browse the repository at this point in the history
… logicv)
  • Loading branch information
xhh0223 committed Dec 5, 2022
1 parent d2289e1 commit 9352129
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion components/popconfirm/PurePanel.tsx
Expand Up @@ -62,7 +62,13 @@ 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-bold`]: !!description,
})}
>
{getRenderPropValue(title)}
</div>
</div>
<div className={`${prefixCls}-description`}>{getRenderPropValue(description)}</div>
<div className={`${prefixCls}-buttons`}>
Expand Down
8 changes: 7 additions & 1 deletion components/popconfirm/style/index.tsx
Expand Up @@ -34,7 +34,6 @@ const genBaseStyle: GenerateStyle<PopconfirmToken> = (token) => {
marginBottom: marginXS,
color: colorText,
fontSize,
fontWeight: fontWeightStrong,
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'start',
Expand All @@ -51,6 +50,13 @@ const genBaseStyle: GenerateStyle<PopconfirmToken> = (token) => {
flex: 'auto',
marginInlineStart: marginXS,
},
'&-title-bold': {
fontWeight: fontWeightStrong,
},
},

[`${componentCls}-message-bold`]: {
fontWeight: fontWeightStrong,
},

[`${componentCls}-description`]: {
Expand Down

0 comments on commit 9352129

Please sign in to comment.