feat(SW-322): refactor shortcuts list

This commit is contained in:
Fredrik Thorsson
2024-10-11 14:00:56 +02:00
parent 67a33c9dc8
commit 5d1bdd9cd8
13 changed files with 77 additions and 58 deletions

View File

@@ -0,0 +1,31 @@
import { ArrowRightIcon } from "@/components/Icons"
import Link from "@/components/TempDesignSystem/Link"
import Body from "@/components/TempDesignSystem/Text/Body"
import styles from "./shortcutsListItems.module.css"
import type { ShortcutsListItemsProps } from "@/types/components/blocks/shortcuts"
export default function ShortcutsListItems({
shortCutList,
}: ShortcutsListItemsProps) {
return (
<ul>
{shortCutList.map((shortcut) => (
<li key={shortcut.title} className={styles.listItem}>
<Link
href={shortcut.url}
target={shortcut.openInNewTab ? "_blank" : undefined}
variant="shortcut"
className={styles.link}
>
<Body textTransform="bold" color="burgundy">
<span>{shortcut.text || shortcut.title}</span>
</Body>
<ArrowRightIcon color="burgundy" width={24} height={24} />
</Link>
</li>
))}
</ul>
)
}