Files
web/apps/scandic-web/components/Header/TopLink/index.tsx
Linus Flood 7fb95f436b Merged in feat/book-522-align (pull request #3101)
feat(BOOK-522): align items in topmenu, header and booking widget

* feat(BOOK-522): align items in topmenu, header and booking widget

* Delete old css variable and use new

* Fixed underline on icons


Approved-by: Erik Tiekstra
2025-11-07 11:06:56 +00:00

30 lines
679 B
TypeScript

import { IconName } from "@scandic-hotels/design-system/Icons/iconName"
import HeaderLink from "../HeaderLink"
import styles from "./topLink.module.css"
import type { TopLinkProps } from "@/types/components/header/topLink"
export default function TopLink({
isLoggedIn,
topLink,
iconSize = 16,
}: TopLinkProps) {
const linkData = isLoggedIn ? topLink.logged_in : topLink.logged_out
if (!linkData?.url || !linkData?.title) {
return null
}
return (
<HeaderLink
href={linkData.url}
iconName={linkData.icon || IconName.Gift}
iconSize={iconSize}
>
<span className={styles.topLink}>{linkData.title}</span>
</HeaderLink>
)
}