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
66679be2
Commit
66679be2
authored
6 years ago
by
Anca Ursachi
Browse files
Options
Downloads
Patches
Plain Diff
fix(iconButton): Disable icon from password validation.
parent
0d609091
No related branches found
No related tags found
2 merge requests
!196
S25 - EiC submit revision
,
!189
S25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/component-faraday-ui/src/IconButton.js
+10
-4
10 additions, 4 deletions
packages/component-faraday-ui/src/IconButton.js
packages/component-faraday-ui/src/PasswordValidation.js
+1
-1
1 addition, 1 deletion
packages/component-faraday-ui/src/PasswordValidation.js
with
11 additions
and
5 deletions
packages/component-faraday-ui/src/IconButton.js
+
10
−
4
View file @
66679be2
import
React
from
'
react
'
import
React
from
'
react
'
import
{
Icon
}
from
'
@pubsweet/ui
'
import
{
Icon
}
from
'
@pubsweet/ui
'
import
styled
from
'
styled-components
'
import
styled
from
'
styled-components
'
import
{
positionHelper
,
marginHelper
,
paddingHelper
}
from
'
./styledHelpers
'
import
{
positionHelper
,
marginHelper
,
paddingHelper
}
from
'
./styledHelpers
'
const
IconButton
=
styled
.
div
`
const
IconButton
=
styled
.
div
`
...
@@ -10,7 +9,7 @@ const IconButton = styled.div`
...
@@ -10,7 +9,7 @@ const IconButton = styled.div`
display: flex;
display: flex;
justify-content: center;
justify-content: center;
opacity:
${
props
=>
(
props
.
disabled
?
0.7
:
1
)}
;
opacity:
${
props
=>
(
props
.
disabled
?
0.7
:
1
)}
;
pointer-events:
${
props
=>
(
props
.
unclickable
?
'
none
'
:
'
auto
'
)}
;
&:hover {
&:hover {
opacity: 0.7;
opacity: 0.7;
}
}
...
@@ -18,16 +17,23 @@ const IconButton = styled.div`
...
@@ -18,16 +17,23 @@ const IconButton = styled.div`
&[disabled] {
&[disabled] {
cursor: not-allowed;
cursor: not-allowed;
}
}
${
marginHelper
}
;
${
marginHelper
}
;
${
paddingHelper
}
;
${
paddingHelper
}
;
${
positionHelper
}
;
${
positionHelper
}
;
`
`
export
default
({
icon
,
onClick
,
iconSize
=
3
,
disabled
,
...
props
})
=>
(
export
default
({
icon
,
onClick
,
unclickable
,
iconSize
=
3
,
disabled
,
...
props
})
=>
(
<
IconButton
<
IconButton
disabled
=
{
disabled
}
disabled
=
{
disabled
}
onClick
=
{
!
disabled
?
onClick
:
null
}
onClick
=
{
!
disabled
?
onClick
:
null
}
unclickable
=
{
unclickable
}
{...
props
}
{...
props
}
>
>
<
Icon
size
=
{
iconSize
}
{...
props
}
>
<
Icon
size
=
{
iconSize
}
{...
props
}
>
...
...
This diff is collapsed.
Click to expand it.
packages/component-faraday-ui/src/PasswordValidation.js
+
1
−
1
View file @
66679be2
...
@@ -52,7 +52,7 @@ const PasswordValidation = ({
...
@@ -52,7 +52,7 @@ const PasswordValidation = ({
<
/Row
>
<
/Row
>
<
Row
alignItems
=
"
center
"
justify
=
"
flex-start
"
mb
=
{
-
1
/
2
}
>
<
Row
alignItems
=
"
center
"
justify
=
"
flex-start
"
mb
=
{
-
1
/
2
}
>
<
IconButton
icon
=
"
info
"
iconSize
=
{
2
}
ml
=
{
-
1
/
2
}
primary
/>
<
IconButton
icon
=
"
info
"
iconSize
=
{
2
}
ml
=
{
-
1
/
2
}
primary
unclickable
/>
<
RulesTitle
>
The
password
must
contain
:
<
/RulesTitle
>
<
RulesTitle
>
The
password
must
contain
:
<
/RulesTitle
>
<
/Row
>
<
/Row
>
...
...
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