aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/comment/pending-comment/pending-comment.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/organisms/comment/pending-comment/pending-comment.tsx')
-rw-r--r--src/components/organisms/comment/pending-comment/pending-comment.tsx36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/components/organisms/comment/pending-comment/pending-comment.tsx b/src/components/organisms/comment/pending-comment/pending-comment.tsx
new file mode 100644
index 0000000..0d37ac2
--- /dev/null
+++ b/src/components/organisms/comment/pending-comment/pending-comment.tsx
@@ -0,0 +1,36 @@
+import { type ForwardRefRenderFunction, forwardRef } from 'react';
+import { useIntl } from 'react-intl';
+import { Card, CardBody, type CardProps } from '../../../molecules';
+
+export type PendingCommentProps = Omit<
+ CardProps<undefined>,
+ | 'children'
+ | 'content'
+ | 'cover'
+ | 'id'
+ | 'isCentered'
+ | 'linkTo'
+ | 'meta'
+ | 'variant'
+>;
+
+const PendingCommentWithRef: ForwardRefRenderFunction<
+ HTMLDivElement,
+ PendingCommentProps
+> = (props, ref) => {
+ const intl = useIntl();
+
+ return (
+ <Card {...props} ref={ref} variant={2}>
+ <CardBody>
+ {intl.formatMessage({
+ defaultMessage: 'This comment is awaiting moderation…',
+ description: 'PendingComment: awaiting moderation text',
+ id: '1d/xvG',
+ })}
+ </CardBody>
+ </Card>
+ );
+};
+
+export const PendingComment = forwardRef(PendingCommentWithRef);