diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-20 11:02:20 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-20 19:20:21 +0100 |
| commit | d5ade2359539648845a5854ed353b29367961d74 (patch) | |
| tree | 45a49d90090408887135a971a7fd79c45d9dcd94 /src/components/organisms/comment/approved-comment | |
| parent | 6ab9635a22d69186c8a24181ad5df7736e288577 (diff) | |
refactor(components): extract MetaItem from MetaList
* replace `items` prop on MetaList with `children` prop: it was too
restrictive and the global options was not really useful. It is better
too give control to the consumers.
Diffstat (limited to 'src/components/organisms/comment/approved-comment')
| -rw-r--r-- | src/components/organisms/comment/approved-comment/approved-comment.tsx | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/components/organisms/comment/approved-comment/approved-comment.tsx b/src/components/organisms/comment/approved-comment/approved-comment.tsx index db5345b..233146d 100644 --- a/src/components/organisms/comment/approved-comment/approved-comment.tsx +++ b/src/components/organisms/comment/approved-comment/approved-comment.tsx @@ -12,6 +12,7 @@ import { CardTitle, CardFooter, CardActions, + MetaItem, } from '../../../molecules'; import styles from './approved-comment.module.scss'; @@ -138,20 +139,17 @@ const ApprovedCommentWithRef: ForwardRefRenderFunction< author.name )} </CardTitle> - <CardMeta - hasInlinedItems - items={[ - { - id: 'publication-date', - label: publicationDateLabel, - value: ( - <Link href={commentLink}> - <Time date={publicationDate} showTime /> - </Link> - ), - }, - ]} - /> + <CardMeta> + <MetaItem + isInline + label={publicationDateLabel} + value={ + <Link href={commentLink}> + <Time date={publicationDate} showTime /> + </Link> + } + /> + </CardMeta> </CardHeader> <CardBody className={styles.body} |
