diff --git a/packages/component-faraday-ui/src/EditorialReportCard.js b/packages/component-faraday-ui/src/EditorialReportCard.js index a294c039795914fe5e5333e95b395f938ee4f187..26fec6bbd70279c7ea2a082ab9266a5277e6d137 100644 --- a/packages/component-faraday-ui/src/EditorialReportCard.js +++ b/packages/component-faraday-ui/src/EditorialReportCard.js @@ -15,6 +15,7 @@ const EditorialReportCard = ({ recommendation, reviewerName, reviewerRole, + hideEditorName, report: { createdOn, reviewer }, }) => ( <Root> @@ -27,7 +28,7 @@ const EditorialReportCard = ({ <Item justify="flex-end"> {reviewer && ( <Fragment> - <Text mr={1 / 2}>{reviewerName}</Text> + <Text mr={1 / 2}>{hideEditorName ? '' : reviewerName}</Text> <Tag mr={2}>{reviewerRole}</Tag> </Fragment> )} diff --git a/packages/component-faraday-ui/src/EditorialReportCard.md b/packages/component-faraday-ui/src/EditorialReportCard.md index 26fd9dce55e7c917e5944b6baf617a3384c50407..b815ad45b89629e2ab332d1540cf5371b011ebe8 100644 --- a/packages/component-faraday-ui/src/EditorialReportCard.md +++ b/packages/component-faraday-ui/src/EditorialReportCard.md @@ -47,7 +47,8 @@ const journal = { }, ], } -;<EditorialReportCard report={report} journal={journal} /> +const hideEditorName = true +;<EditorialReportCard report={report} journal={journal}hideEditorName={hideEditorName}/> ``` Card with message for the editorial team @@ -97,7 +98,8 @@ const journal = { }, ], } -;<EditorialReportCard report={report} journal={journal} /> +const hideEditorName = false +;<EditorialReportCard report={report} journal={journal} hideEditorName={hideEditorName} /> ``` Card with message for the editorial team and for the author @@ -131,6 +133,7 @@ const report = { editorInChief: false, handlingEditor: true, }, + } const journal = { recommendations: [ @@ -152,5 +155,6 @@ const journal = { }, ], } -;<EditorialReportCard report={report} journal={journal} /> +const hideEditorName = false +;<EditorialReportCard report={report} journal={journal} hideEditorName={hideEditorName}/> ```