feat(SW-322): make Shortcut reusable component

This commit is contained in:
Fredrik Thorsson
2024-10-07 15:04:50 +02:00
parent 2db756b738
commit c1be1619da
6 changed files with 42 additions and 48 deletions

View File

@@ -1,6 +1,4 @@
import { ArrowRightIcon } from "@/components/Icons"
import Link from "@/components/TempDesignSystem/Link"
import Body from "@/components/TempDesignSystem/Text/Body"
import Shortcut from "../Shortcut"
import styles from "./oneColumnList.module.css"
@@ -9,19 +7,7 @@ import { ShortcutsListProps } from "@/types/components/myPages/myPage/shortcuts"
export default function OneColumnList({ linkList }: ShortcutsListProps) {
return (
<section className={styles.section}>
{linkList.map((shortcut) => (
<Link
href={shortcut.url}
key={shortcut.title}
target={shortcut.openInNewTab ? "_blank" : undefined}
variant="shortcut"
>
<Body textTransform="bold" color="burgundy">
<span>{shortcut.text ? shortcut.text : shortcut.title}</span>
</Body>
<ArrowRightIcon color="burgundy" width={24} height={24} />
</Link>
))}
<Shortcut linkList={linkList} />
</section>
)
}