Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xpub-faraday
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
xpub
xpub-faraday
Commits
9867e98a
Commit
9867e98a
authored
6 years ago
by
Mihail Hagiu
Browse files
Options
Downloads
Patches
Plain Diff
docs(AssignHE): Wrote documentation for AssignHE Contextual Box
parent
3ba02811
No related branches found
No related tags found
3 merge requests
!222
Sprint #26
,
!217
Sprint #26
,
!191
Hin 1116 documentation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/component-faraday-ui/src/contextualBoxes/AssignHE.js
+24
-3
24 additions, 3 deletions
...ages/component-faraday-ui/src/contextualBoxes/AssignHE.js
packages/component-faraday-ui/src/contextualBoxes/AssignHE.md
+15
-5
15 additions, 5 deletions
...ages/component-faraday-ui/src/contextualBoxes/AssignHE.md
with
39 additions
and
8 deletions
packages/component-faraday-ui/src/contextualBoxes/AssignHE.js
+
24
−
3
View file @
9867e98a
import
React
,
{
Fragment
}
from
'
react
'
import
PropTypes
from
'
prop-types
'
import
styled
from
'
styled-components
'
import
{
th
}
from
'
@pubsweet/ui-toolkit
'
import
{
Button
,
TextField
}
from
'
@pubsweet/ui
'
...
...
@@ -49,7 +50,7 @@ const AssignHE = ({
<
/TextContainer
>
{
handlingEditors
.
length
>
0
&&
(
<
Fragment
>
<
Row
alignItems
=
"
center
"
height
=
{
4
}
pl
=
{
1
}
>
<
Row
alignItems
=
"
center
"
height
=
"
4
"
pl
=
{
1
}
>
<
Item
flex
=
{
1
}
>
<
Label
>
Name
<
/Label
>
<
/Item
>
...
...
@@ -62,7 +63,7 @@ const AssignHE = ({
<
CustomRow
alignItems
=
"
center
"
data
-
test
-
id
=
{
`manuscript-assign-he-invite-
${
he
.
id
}
`
}
height
=
{
4
}
height
=
"
4
"
isFirst
=
{
index
===
0
}
key
=
{
he
.
id
}
pl
=
{
1
}
...
...
@@ -96,6 +97,27 @@ const AssignHE = ({
<
/Root
>
)
AssignHE
.
propTypes
=
{
/** Changes the search value to lowercase letters. */
changeSearch
:
PropTypes
.
func
,
/** The value of the search input box. */
searchValue
:
PropTypes
.
string
,
/** Clears the value of the search input box. */
clearSearch
:
PropTypes
.
func
,
/** The list of available handling editors. */
handlingEditors
:
PropTypes
.
arrayOf
(
PropTypes
.
object
),
/** Invites the selected handling editor. */
inviteHandlingEditor
:
PropTypes
.
func
,
}
AssignHE
.
defaultProps
=
{
changeSearch
:
undefined
,
searchValue
:
''
,
clearSearch
:
undefined
,
handlingEditors
:
[],
inviteHandlingEditor
:
undefined
,
}
export
default
compose
(
defaultProps
({
inviteHandlingEditor
:
he
=>
{},
...
...
@@ -134,7 +156,6 @@ export default compose(
// #region styles
const
Root
=
styled
.
div
`
background-color:
${
th
(
'
colorBackgroundHue2
'
)}
;
${
paddingHelper
}
;
`
...
...
This diff is collapsed.
Click to expand it.
packages/component-faraday-ui/src/contextualBoxes/AssignHE.md
+
15
−
5
View file @
9867e98a
...
...
@@ -2,12 +2,22 @@ Assign Handling Editor contextual box.
```
js
const
handlingEditors
=
[
{
id
:
'
1
'
,
name
:
'
Handling Edi
'
,
email
:
'
handling@edi.com
'
},
{
id
:
'
2
'
,
name
:
'
Aurel Vlaicu
'
,
email
:
'
aurel@vlaicu.com
'
},
{
id
:
'
3
'
,
name
:
'
Gheorghe Hagi
'
,
email
:
'
gica@hagi.com
'
},
];
{
id
:
'
1
'
,
firstName
:
'
Handling
'
,
lastName
:
'
Edi
'
,
email
:
'
handling@edi.com
'
,
},
{
id
:
'
2
'
,
firstName
:
'
Aurel
'
,
lastName
:
'
Vlaicu
'
,
email
:
'
aurel@vlaicu.com
'
,
},
{
id
:
'
3
'
,
firstName
:
'
Gheorghe
'
,
lastName
:
'
Hagi
'
,
email
:
'
gica@hagi.com
'
},
]
<
ContextualBox
label
=
"
Assign Handling Editor
"
>
;
<
ContextualBox
label
=
"
Assign Handling Editor
"
>
<
AssignHE
handlingEditors
=
{
handlingEditors
}
inviteHandlingEditor
=
{
he
=>
console
.
log
(
'
inviting:
'
,
he
)}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment