2018-10-22 21:20:28 +08:00
|
|
|
---
|
|
|
|
category: Components
|
|
|
|
type: Data Display
|
|
|
|
title: Comment
|
|
|
|
cols: 1
|
2020-06-05 13:50:09 +08:00
|
|
|
cover: https://gw.alipayobjects.com/zos/alicdn/ILhxpGzBO/Comment.svg
|
2018-10-22 21:20:28 +08:00
|
|
|
---
|
|
|
|
|
2018-11-02 23:38:52 +08:00
|
|
|
A comment displays user feedback and discussion to website content.
|
2018-10-22 21:20:28 +08:00
|
|
|
|
|
|
|
## When To Use
|
|
|
|
|
2018-11-02 23:38:52 +08:00
|
|
|
Comments can be used to enable discussions on an entity such as a page, blog post, issue or other.
|
2018-10-22 21:20:28 +08:00
|
|
|
|
|
|
|
## API
|
|
|
|
|
2019-07-11 14:14:33 +08:00
|
|
|
| Property | Description | Type | Default | Version |
|
|
|
|
| --- | --- | --- | --- | --- |
|
2020-07-01 21:35:29 +08:00
|
|
|
| actions | List of action items rendered below the comment content | Array<ReactNode> | - | |
|
|
|
|
| author | The element to display as the comment author | string \| ReactNode | - | |
|
|
|
|
| avatar | The element to display as the comment avatar - generally an antd Avatar or src | string \| ReactNode | - | |
|
2019-11-20 20:31:43 +08:00
|
|
|
| children | Nested comments should be provided as children of the Comment | ReactNode | - | |
|
2020-07-01 21:35:29 +08:00
|
|
|
| content | The main content of the comment | string \| ReactNode | - | |
|
|
|
|
| datetime | A datetime element containing the time to be displayed | string \| ReactNode | - | |
|