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
5eb023ca
Commit
5eb023ca
authored
6 years ago
by
MB Pro
Browse files
Options
Downloads
Patches
Plain Diff
fix(menuCountry): fix border error and initial values
parent
accc347d
No related branches found
No related tags found
3 merge requests
!222
Sprint #26
,
!217
Sprint #26
,
!216
fix(menuCountry): fix border error and initial values
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/component-faraday-ui/src/AuthorCard.js
+3
-3
3 additions, 3 deletions
packages/component-faraday-ui/src/AuthorCard.js
packages/component-faraday-ui/src/MenuCountry.js
+9
-3
9 additions, 3 deletions
packages/component-faraday-ui/src/MenuCountry.js
with
12 additions
and
6 deletions
packages/component-faraday-ui/src/AuthorCard.js
+
3
−
3
View file @
5eb023ca
...
@@ -6,7 +6,7 @@ import { th } from '@pubsweet/ui-toolkit'
...
@@ -6,7 +6,7 @@ import { th } from '@pubsweet/ui-toolkit'
import
{
required
}
from
'
xpub-validators
'
import
{
required
}
from
'
xpub-validators
'
import
{
reduxForm
,
Field
}
from
'
redux-form
'
import
{
reduxForm
,
Field
}
from
'
redux-form
'
import
{
MenuCountry
}
from
'
pubsweet-component-faraday-ui
'
import
{
MenuCountry
,
ItemOverrideAlert
}
from
'
pubsweet-component-faraday-ui
'
import
{
H3
,
Spinner
,
Checkbox
,
TextField
,
ValidatedField
}
from
'
@pubsweet/ui
'
import
{
H3
,
Spinner
,
Checkbox
,
TextField
,
ValidatedField
}
from
'
@pubsweet/ui
'
import
{
import
{
compose
,
compose
,
...
@@ -187,7 +187,7 @@ const AuthorEdit = ({
...
@@ -187,7 +187,7 @@ const AuthorEdit = ({
validate
=
{[
required
]}
validate
=
{[
required
]}
/
>
/
>
<
/Item
>
<
/Item
>
<
Item
vertical
>
<
Item
OverrideAlert
vertical
>
<
Label
required
>
Country
<
/Label
>
<
Label
required
>
Country
<
/Label
>
<
ValidatedField
<
ValidatedField
component
=
{
MenuCountry
}
component
=
{
MenuCountry
}
...
@@ -196,7 +196,7 @@ const AuthorEdit = ({
...
@@ -196,7 +196,7 @@ const AuthorEdit = ({
placeholder
=
"
Please select
"
placeholder
=
"
Please select
"
validate
=
{[
required
]}
validate
=
{[
required
]}
/
>
/
>
<
/Item
>
<
/Item
OverrideAlert
>
<
/Row
>
<
/Row
>
<
/AuthorContainer
>
<
/AuthorContainer
>
)
)
...
...
This diff is collapsed.
Click to expand it.
packages/component-faraday-ui/src/MenuCountry.js
+
9
−
3
View file @
5eb023ca
import
React
,
{
Fragment
}
from
'
react
'
import
React
,
{
Fragment
}
from
'
react
'
import
styled
from
'
styled-components
'
import
styled
from
'
styled-components
'
import
{
th
,
override
}
from
'
@pubsweet/ui-toolkit
'
import
{
th
,
override
,
validationColor
}
from
'
@pubsweet/ui-toolkit
'
import
{
startsWith
,
toLower
,
get
,
head
}
from
'
lodash
'
import
{
startsWith
,
toLower
,
get
,
head
}
from
'
lodash
'
import
{
withCountries
}
from
'
pubsweet-component-faraday-ui
'
import
{
withCountries
}
from
'
pubsweet-component-faraday-ui
'
import
{
compose
,
withState
,
withHandlers
,
withProps
}
from
'
recompose
'
import
{
compose
,
withState
,
withHandlers
,
withProps
}
from
'
recompose
'
...
@@ -20,6 +20,7 @@ const Menu = ({
...
@@ -20,6 +20,7 @@ const Menu = ({
placeholder
,
placeholder
,
handleSelect
,
handleSelect
,
onTextChange
,
onTextChange
,
validationStatus
,
})
=>
(
})
=>
(
<
Fragment
>
<
Fragment
>
{
open
&&
<
CloseOverlay
onClick
=
{
toggleMenu
}
/>
}
{
open
&&
<
CloseOverlay
onClick
=
{
toggleMenu
}
/>
}
...
@@ -29,6 +30,7 @@ const Menu = ({
...
@@ -29,6 +30,7 @@ const Menu = ({
onClick
=
{
toggleMenu
}
onClick
=
{
toggleMenu
}
onKeyUp
=
{
onEnter
}
onKeyUp
=
{
onEnter
}
placeholder
=
{
placeholder
}
placeholder
=
{
placeholder
}
validationStatus
=
{
validationStatus
}
value
=
{
userInput
}
value
=
{
userInput
}
/
>
/
>
{
open
&&
(
{
open
&&
(
...
@@ -46,7 +48,11 @@ const Menu = ({
...
@@ -46,7 +48,11 @@ const Menu = ({
export
default
compose
(
export
default
compose
(
withCountries
,
withCountries
,
withState
(
'
userInput
'
,
'
updateUserInput
'
,
''
),
withState
(
'
userInput
'
,
'
updateUserInput
'
,
({
value
,
countryLabel
})
=>
(
value
?
countryLabel
(
value
)
:
''
),
),
withState
(
'
open
'
,
'
updateOptionsVisibility
'
,
false
),
withState
(
'
open
'
,
'
updateOptionsVisibility
'
,
false
),
withHandlers
({
withHandlers
({
handleSelect
:
({
handleSelect
:
({
...
@@ -93,7 +99,7 @@ export default compose(
...
@@ -93,7 +99,7 @@ export default compose(
const
Input
=
styled
.
input
`
const
Input
=
styled
.
input
`
width: 100%;
width: 100%;
height: calc(
${
th
(
'
gridUnit
'
)}
* 4);
height: calc(
${
th
(
'
gridUnit
'
)}
* 4);
border:
${
th
(
'
accordion.border
'
)
}
;
border:
${
th
(
'
borderWidth
'
)}
${
th
(
'
borderStyle
'
)}
${
validationColor
}
;
border-radius:
${
th
(
'
borderRadius
'
)}
;
border-radius:
${
th
(
'
borderRadius
'
)}
;
padding: 0
${
th
(
'
gridUnit
'
)}
;
padding: 0
${
th
(
'
gridUnit
'
)}
;
font-family:
${
th
(
'
fontHeading
'
)}
;
font-family:
${
th
(
'
fontHeading
'
)}
;
...
...
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