mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 07:56:28 +08:00
* fix: #23986 [Comment] Should not render avatar wrapper when avatar is not present * #23986 test snapshots revision
This commit is contained in:
parent
e6a8736b9d
commit
9c0f12c7e8
@ -7,9 +7,6 @@ exports[`Comment rtl render component should be rendered correctly in RTL direct
|
||||
<div
|
||||
class="ant-comment-inner"
|
||||
>
|
||||
<div
|
||||
class="ant-comment-avatar"
|
||||
/>
|
||||
<div
|
||||
class="ant-comment-content"
|
||||
>
|
||||
|
@ -52,11 +52,11 @@ const Comment: React.FC<CommentProps> = ({
|
||||
|
||||
const prefixCls = getPrefixCls('comment', customizePrefixCls);
|
||||
|
||||
const avatarDom = (
|
||||
const avatarDom = avatar ? (
|
||||
<div className={`${prefixCls}-avatar`}>
|
||||
{typeof avatar === 'string' ? <img src={avatar} alt="comment-avatar" /> : avatar}
|
||||
</div>
|
||||
);
|
||||
) : null;
|
||||
|
||||
const actionDom =
|
||||
actions && actions.length ? (
|
||||
|
@ -9417,9 +9417,6 @@ exports[`ConfigProvider components Comment configProvider 1`] = `
|
||||
<div
|
||||
class="config-comment-inner"
|
||||
>
|
||||
<div
|
||||
class="config-comment-avatar"
|
||||
/>
|
||||
<div
|
||||
class="config-comment-content"
|
||||
>
|
||||
@ -9442,9 +9439,6 @@ exports[`ConfigProvider components Comment configProvider 1`] = `
|
||||
<div
|
||||
class="config-comment-inner"
|
||||
>
|
||||
<div
|
||||
class="config-comment-avatar"
|
||||
/>
|
||||
<div
|
||||
class="config-comment-content"
|
||||
>
|
||||
@ -9470,9 +9464,6 @@ exports[`ConfigProvider components Comment configProvider componentSize large 1`
|
||||
<div
|
||||
class="config-comment-inner"
|
||||
>
|
||||
<div
|
||||
class="config-comment-avatar"
|
||||
/>
|
||||
<div
|
||||
class="config-comment-content"
|
||||
>
|
||||
@ -9495,9 +9486,6 @@ exports[`ConfigProvider components Comment configProvider componentSize large 1`
|
||||
<div
|
||||
class="config-comment-inner"
|
||||
>
|
||||
<div
|
||||
class="config-comment-avatar"
|
||||
/>
|
||||
<div
|
||||
class="config-comment-content"
|
||||
>
|
||||
@ -9523,9 +9511,6 @@ exports[`ConfigProvider components Comment configProvider componentSize middle 1
|
||||
<div
|
||||
class="config-comment-inner"
|
||||
>
|
||||
<div
|
||||
class="config-comment-avatar"
|
||||
/>
|
||||
<div
|
||||
class="config-comment-content"
|
||||
>
|
||||
@ -9548,9 +9533,6 @@ exports[`ConfigProvider components Comment configProvider componentSize middle 1
|
||||
<div
|
||||
class="config-comment-inner"
|
||||
>
|
||||
<div
|
||||
class="config-comment-avatar"
|
||||
/>
|
||||
<div
|
||||
class="config-comment-content"
|
||||
>
|
||||
@ -9576,9 +9558,6 @@ exports[`ConfigProvider components Comment normal 1`] = `
|
||||
<div
|
||||
class="ant-comment-inner"
|
||||
>
|
||||
<div
|
||||
class="ant-comment-avatar"
|
||||
/>
|
||||
<div
|
||||
class="ant-comment-content"
|
||||
>
|
||||
@ -9601,9 +9580,6 @@ exports[`ConfigProvider components Comment normal 1`] = `
|
||||
<div
|
||||
class="ant-comment-inner"
|
||||
>
|
||||
<div
|
||||
class="ant-comment-avatar"
|
||||
/>
|
||||
<div
|
||||
class="ant-comment-content"
|
||||
>
|
||||
@ -9629,9 +9605,6 @@ exports[`ConfigProvider components Comment prefixCls 1`] = `
|
||||
<div
|
||||
class="prefix-Comment-inner"
|
||||
>
|
||||
<div
|
||||
class="prefix-Comment-avatar"
|
||||
/>
|
||||
<div
|
||||
class="prefix-Comment-content"
|
||||
>
|
||||
@ -9654,9 +9627,6 @@ exports[`ConfigProvider components Comment prefixCls 1`] = `
|
||||
<div
|
||||
class="prefix-Comment-inner"
|
||||
>
|
||||
<div
|
||||
class="prefix-Comment-avatar"
|
||||
/>
|
||||
<div
|
||||
class="prefix-Comment-content"
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user