allow setting a global link target

This commit is contained in:
Ben Phelps 2022-09-21 08:40:19 +03:00
parent 75244cc40e
commit 20ac15b18c
7 changed files with 26 additions and 25 deletions

View file

@ -21,7 +21,7 @@ function resolveIcon(icon) {
return `https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/${icon}.png`;
}
export default function Item({ service }) {
export default function Item({ service, target = "_blank" }) {
const hasLink = service.href && service.href !== "#";
return (
@ -37,7 +37,7 @@ export default function Item({ service }) {
(hasLink ? (
<a
href={service.href}
target="_blank"
target={target}
rel="noreferrer"
className="flex-shrink-0 flex items-center justify-center w-12 "
>
@ -52,7 +52,7 @@ export default function Item({ service }) {
{hasLink ? (
<a
href={service.href}
target="_blank"
target={target}
rel="noreferrer"
className="flex-1 flex items-center justify-between rounded-r-md "
>