Comment
A comment displays discussions and user feedback.Installation
| Install | yarn add @atlaskit/comment |
|---|---|
| Source | Bitbucket.org, (opens new window) |
| npm | @atlaskit/comment, (opens new window) |
| Bundle | unpkg.com, (opens new window) |
Props
| Description | A list of |
|---|---|
| Default | [] |
| Type | React.ReactNode[] |
| Description | Content that is rendered after the comment's content. |
|---|---|
| Type | string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |
| Description | The element to display as the avatar. It's best to use |
|---|---|
| Type | string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |
| Description | Provide nested comments as children. |
|---|---|
| Type | string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |
| Description | The main content for the comment. |
|---|---|
| Type | string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |
| Description | A |
|---|---|
| Type | string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |
| Description | A list of |
|---|---|
| Default | [] |
| Type | React.ReactNode[] |
| Description | Text to show in the error icon label. |
|---|---|
| Default | "" |
| Type | string |
| Description | Use this to set the semantic heading level of the comment. The default comment heading has an |
|---|---|
| Default | "3" |
| Type | "1" | "3" | "2" | "4" | "5" | "6" |
| Description | Sets whether this comment should be highlighted. |
|---|---|
| Default | false |
| Type | boolean |
| Description | An ID to be applied to the comment. |
|---|---|
| Type | string |
| Description | Indicates whether the component is in an error state. Hides actions and time. |
|---|---|
| Default | false |
| Type | boolean |
| Description | Enables "optimistic saving" mode which removes actions and displays text from the |
|---|---|
| Default | false |
| Type | boolean |
| Description | Text for the "restricted to" label. This will display in the top items, before the main content. |
|---|---|
| Default | "" |
| Type | string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |
| Description | Text to show when in "optimistic saving" mode. |
|---|---|
| Default | "Sending..." |
| Type | string |
| Description | Controls if the comment header should wrap. |
|---|---|
| Type | boolean |
| Description | Controls if nested comments are rendered at the same depth as the parent comment. |
|---|---|
| Type | boolean |
| Description | Optional hook for automated testing. |
|---|---|
| Type | string |
| Description | A |
|---|---|
| Type | string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |
| Description | The type of comment. This will be rendered in a lozenge at the top of the comment, before the main content. |
|---|---|
| Type | string |