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
498c30cf
Commit
498c30cf
authored
6 years ago
by
Sinzeanu Demetriad
Browse files
Options
Downloads
Patches
Plain Diff
feat(My-Icons): Use Custom Icons
parent
6109bf28
No related branches found
No related tags found
3 merge requests
!222
Sprint #26
,
!217
Sprint #26
,
!190
Hin 1141
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/component-faraday-ui/src/PersonInvitation.js
+1
-1
1 addition, 1 deletion
packages/component-faraday-ui/src/PersonInvitation.js
packages/component-manuscript/src/atoms/Icon.js
+23
-0
23 additions, 0 deletions
packages/component-manuscript/src/atoms/Icon.js
with
24 additions
and
1 deletion
packages/component-faraday-ui/src/PersonInvitation.js
+
1
−
1
View file @
498c30cf
...
@@ -29,7 +29,7 @@ const PersonInvitation = ({
...
@@ -29,7 +29,7 @@ const PersonInvitation = ({
>
>
{
showModal
=>
(
{
showModal
=>
(
<
IconButton
<
IconButton
icon
=
"
re
fresh-cw
"
icon
=
"
re
send
"
iconSize
=
{
2
}
iconSize
=
{
2
}
ml
=
{
2
}
ml
=
{
2
}
onClick
=
{
showModal
}
onClick
=
{
showModal
}
...
...
This diff is collapsed.
Click to expand it.
packages/component-manuscript/src/atoms/Icon.js
0 → 100644
+
23
−
0
View file @
498c30cf
import
React
from
'
react
'
import
{
withTheme
}
from
'
styled-components
'
import
{
get
,
has
}
from
'
lodash
'
import
*
as
reactFeatherIcons
from
'
react-feather
'
const
Icon
=
({
iconName
,
overrideName
,
className
,
theme
,
...
props
})
=>
{
const
isOverrideInTheme
=
has
(
theme
.
icons
,
overrideName
)
if
(
isOverrideInTheme
)
{
const
OverrideIcon
=
get
(
theme
.
icons
,
overrideName
)
return
<
OverrideIcon
className
=
{
className
}
{...
props
}
/
>
}
const
isIconInDefaultSet
=
reactFeatherIcons
[
iconName
]
// TODO: conversation with Pubsweet - what should we default to when
// there's no obvious react-feather equivalent?
if
(
!
isIconInDefaultSet
)
{
// eslint-disable-next-line no-console
console
.
warn
(
"
Icon '%s' not found
"
,
iconName
)
return
null
}
const
DefaultIcon
=
reactFeatherIcons
[
iconName
]
return
<
DefaultIcon
className
=
{
className
}
{...
props
}
/
>
}
export
default
withTheme
(
Icon
)
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