Adds the option for a bookmark icon (same functionality as service icons). Falls back to abbreviation.

Revert "Adds the option for a bookmark icon (same functionality as service icons). Falls back to abbreviation."

This reverts commit d7131584442ba5a52823cf0aa6e96c4b5f09141a.

Add icons to bookmarks
pull/487/head
Don Reece 2 years ago committed by Michael Shamoon
parent 71faaa56dc
commit 8115b54ef9

@ -1,6 +1,7 @@
import { useContext } from "react"; import { useContext } from "react";
import { SettingsContext } from "utils/contexts/settings"; import { SettingsContext } from "utils/contexts/settings";
import ResolvedIcon from "components/resolvedicon";
export default function Item({ bookmark }) { export default function Item({ bookmark }) {
const { hostname } = new URL(bookmark.href); const { hostname } = new URL(bookmark.href);
@ -16,6 +17,11 @@ export default function Item({ bookmark }) {
> >
<div className="flex"> <div className="flex">
<div className="flex-shrink-0 flex items-center justify-center w-11 bg-theme-500/10 dark:bg-theme-900/50 text-theme-700 hover:text-theme-700 dark:text-theme-200 text-sm font-medium rounded-l-md"> <div className="flex-shrink-0 flex items-center justify-center w-11 bg-theme-500/10 dark:bg-theme-900/50 text-theme-700 hover:text-theme-700 dark:text-theme-200 text-sm font-medium rounded-l-md">
{bookmark.icon &&
<div className="flex-shrink-0 w-5 h-5">
<ResolvedIcon icon={bookmark.icon} />
</div>
}
{bookmark.abbr} {bookmark.abbr}
</div> </div>
<div className="flex-1 flex items-center justify-between rounded-r-md "> <div className="flex-1 flex items-center justify-between rounded-r-md ">

Loading…
Cancel
Save