mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-17 10:19:49 +00:00
allow setting a global link target
This commit is contained in:
parent
75244cc40e
commit
20ac15b18c
7 changed files with 26 additions and 25 deletions
|
@ -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 "
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue