From 16b386c064ff7e732923ff86fe2550b30e03945c Mon Sep 17 00:00:00 2001
From: Mihail Hagiu <mihail.hagiu@thinslices.com>
Date: Tue, 6 Nov 2018 11:28:29 +0200
Subject: [PATCH] docs(InviteHandlingEditor+InviteReviewer): Changed prop list
 to table and renamed files to README.md

---
 .../src/inviteHandlingEditor/README.md        | 46 +++++++++++++++++++
 .../withInviteHandlingEditor.md               | 28 -----------
 .../{withInviteReviewer.md => README.md}      | 24 ++++++----
 3 files changed, 62 insertions(+), 36 deletions(-)
 create mode 100644 packages/component-manuscript/src/inviteHandlingEditor/README.md
 delete mode 100644 packages/component-manuscript/src/inviteHandlingEditor/withInviteHandlingEditor.md
 rename packages/component-manuscript/src/inviteReviewer/{withInviteReviewer.md => README.md} (62%)

diff --git a/packages/component-manuscript/src/inviteHandlingEditor/README.md b/packages/component-manuscript/src/inviteHandlingEditor/README.md
new file mode 100644
index 000000000..665c53eb1
--- /dev/null
+++ b/packages/component-manuscript/src/inviteHandlingEditor/README.md
@@ -0,0 +1,46 @@
+## Hindawi Handling Editor Invite HOC.
+
+Injects `assignHE`, `revokeHE` and `onHEResponse` handlers as props.
+
+### withInviteHandlingEditor props
+
+`inviteHandlingEditor` namespace contains the following fields:
+Name|Type|Description
+---|---|---
+assignHE |`(email, modalProps) => any`|sends an invitation to the handling editor
+revokeHE |`(invitationId, modalProps) => any`|revokes a sent invitation to the handling editor
+onHEResponse |`(reduxFormValues, modalProps) => any`|handles the handling editor's response
+
+_Note: The functions must be used withing a modal_
+
+```javascript
+const EditorInChiefPanel = ({ assignHE, revokeHE }) => (
+  <Modal>
+    <span>Handlin d'Editor</span>
+    <button onClick={() => assignHE(email, { ...modalProps, setFetching })}>
+      Resend Invitation
+    </button>
+    <button
+      onClick={() => revokeHE(invitationId, { ...modalProps, setFetching })}
+    >
+      Cancel Invitation
+    </button>
+  </Modal>
+)
+
+const HandlingEditorPanel = ({ onHeResponse }) => (
+  <Modal>
+    <span>Accept invitation?</span>
+    <button
+      onClick={() => onHeResponse(reduxFormValues, { ...modalProps, setFetching })}
+    >
+      Yes
+    </button>
+    <button
+      onClick={() => onHeResponse(reduxFormValues, { ...modalProps, setFetching })}
+    >
+      No
+    </button>
+  </Modal>
+)
+```
diff --git a/packages/component-manuscript/src/inviteHandlingEditor/withInviteHandlingEditor.md b/packages/component-manuscript/src/inviteHandlingEditor/withInviteHandlingEditor.md
deleted file mode 100644
index 257c2b2a2..000000000
--- a/packages/component-manuscript/src/inviteHandlingEditor/withInviteHandlingEditor.md
+++ /dev/null
@@ -1,28 +0,0 @@
-## Hindawi Handling Editor Invite HOC.
-
-Injects `assignHE`, `revokeHE` and `onHEResponse` handlers as props.
-
-### withInviteHandlingEditor props
-
-* `inviteHandlingEditor: object`: namespace containing the following fields:
-  * `assignHE: function`: sends an invitation to the handling editor.
-  * `revokeHE: function`: revokes a sent invitation to the handling editor.
-  * `onHeResponse: function`: handles the handling editor's response.
-
-```javascript
-const EditorInChiefPanel = ({ assignHE, revokeHE }) => (
-  <Modal>
-    <span>Handlin d'Editor</span>
-    <button onClick={() => assignHE(email, {...modalProps, setFetching})}>Resend Invitation</button>
-    <button onClick={() => revokeHE(invitationId, {...modalProps, setFetching})}>Cancel Invitation</button>
-  </Modal>
-)
-
-const HandlingEditorPanel = ({ onHeResponse }) => (
-  <Modal>
-    <span>Accept invitation?</span>
-    <button onClick={() => onHeResponse(values, {...modalProps, setFetching})}>Yes</button>
-    <button onClick={() => onHeResponse(values, {...modalProps, setFetching})}>No</button>
-  </Modal>
-)
-```
diff --git a/packages/component-manuscript/src/inviteReviewer/withInviteReviewer.md b/packages/component-manuscript/src/inviteReviewer/README.md
similarity index 62%
rename from packages/component-manuscript/src/inviteReviewer/withInviteReviewer.md
rename to packages/component-manuscript/src/inviteReviewer/README.md
index e8d03b883..f8bae3787 100644
--- a/packages/component-manuscript/src/inviteReviewer/withInviteReviewer.md
+++ b/packages/component-manuscript/src/inviteReviewer/README.md
@@ -4,12 +4,16 @@ Injects `onInviteReviewer`, `onInvitePublonReviewer`, `onResendInviteReviewer`,
 
 ### withInviteReviewer props
 
-* `inviteReviewer: object`: namespace containing the following fields:
-  * `onInviteReviewer: function`: sends an invitation to the reviewer.
-  * `onInvitePublonReviewer: function`: sends an invitation to a Publon reviewer.
-  * `onResendInviteReviewer: function`: resends an invitation to an already invited reviewer.
-  * `onRevokeInviteReviewer: function`: cancels an invitation to an invited reviewer.
-  * `onReviewerResponse: function`: handles the reviewer response to the invitation.
+`inviteReviewer` namespace contains the following fields:
+Name|Type|Description
+---|---|---
+onInviteReviewer|`(reduxFormValues, modalProps) => any`|sends an invitation to the reviewer
+onInvitePublonReviewer|`(reduxFormValues, modalProps) => any`|sends an invitation to a Publon reviewer
+onResendInviteReviewer|`(email, modalProps) => any`|resends an invitation to an already invited reviewer
+onRevokeInviteReviewer|`(invitationId, modalProps) => any`|cancels an invitation to an invited reviewer
+onReviewerResponse|`(reduxFormValues, modalProps) => any`|handles the reviewer response to the invitation
+
+_Note: The functions must be used withing a modal_
 
 ```javascript
 const InviteReviewer = ({
@@ -62,12 +66,16 @@ const Invitation = ({ onReviewerResponse }) => (
   <Modal>
     <span>Accept invitation?</span>
     <button
-      onClick={() => onReviewerResponse(values, { ...modalProps, setFetching })}
+      onClick={() =>
+        onReviewerResponse(reduxFormValues, { ...modalProps, setFetching })
+      }
     >
       Yes
     </button>
     <button
-      onClick={() => onReviewerResponse(values, { ...modalProps, setFetching })}
+      onClick={() =>
+        onReviewerResponse(reduxFormValues, { ...modalProps, setFetching })
+      }
     >
       No
     </button>
-- 
GitLab