diff --git a/.changeset/seven-students-impress.md b/.changeset/seven-students-impress.md new file mode 100644 index 000000000..960acf3d9 --- /dev/null +++ b/.changeset/seven-students-impress.md @@ -0,0 +1,5 @@ +--- +'@cloudfour/patterns': minor +--- + +Add `comment_content` block to Comments diff --git a/src/components/comment/comment.stories.mdx b/src/components/comment/comment.stories.mdx index 31f261951..8bb28ff5a 100644 --- a/src/components/comment/comment.stories.mdx +++ b/src/components/comment/comment.stories.mdx @@ -310,6 +310,7 @@ While it is theoretically possible to infinitely nest `children`, it's recommend - `replies`: Use to pass in your own replies markup. This is useful if you need to modify other blocks within replies. - `reply_form`: Can be used to replace the entire reply form - `reply_form_hidden_inputs`: Can be used to add hidden inputs to the comment reply form. This can be useful for integrating with systems like Wordpress which use these provide additional context during form submission. +- `comment_content`: Can be used to replace the comment content. Can be useful if ## JavaScript Instructions diff --git a/src/components/comment/comment.twig b/src/components/comment/comment.twig index 2ca92afe1..3c4422cf6 100644 --- a/src/components/comment/comment.twig +++ b/src/components/comment/comment.twig @@ -43,7 +43,9 @@ message: 'This comment is awaiting moderation.' } only %} {% endif %} - {{comment.comment_content|raw}} + {% block comment_content %} + {{comment.comment_content|raw}} + {% endblock %} {% endblock %} {% endembed %}