mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-27 06:49:37 +02:00
Custom icons for bookmarks
This commit is contained in:
parent
1fbe0746a4
commit
a5d6cf04cf
9 changed files with 169 additions and 48 deletions
|
@ -24,7 +24,14 @@ const BookmarkCard = (props: ComponentProps): JSX.Element => {
|
|||
key={`bookmark-${bookmark.id}`}>
|
||||
{bookmark.icon && (
|
||||
<div className={classes.BookmarkIcon}>
|
||||
<Icon icon={iconParser(bookmark.icon)} />
|
||||
{(/.(jpeg|jpg|png)$/i).test(bookmark.icon)
|
||||
? <img
|
||||
src={`/uploads/${bookmark.icon}`}
|
||||
alt={`${bookmark.name} icon`}
|
||||
className={classes.CustomIcon}
|
||||
/>
|
||||
: <Icon icon={iconParser(bookmark.icon)} />
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
{bookmark.name}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue