37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import { Link } from "react-router-dom";
|
|
import logoOnDark from "./fsp-logo-on-dark.svg";
|
|
import logoOnLight from "./fsp-logo-on-light.svg";
|
|
import styles from "./brand-logo.module.css";
|
|
|
|
type BrandLogoProps = {
|
|
/** Background the logo sits on; selects the brandbook color variant. */
|
|
tone?: "light" | "dark";
|
|
/** Destination of the home link. */
|
|
to?: string;
|
|
/** Cabinet name shown after the product name. */
|
|
context?: string | undefined;
|
|
};
|
|
|
|
/**
|
|
* Brandbook FSP logo (logo_02w for light, logo_01 for dark backgrounds)
|
|
* followed by the product name. The whole block is one link home.
|
|
*/
|
|
export function BrandLogo({ tone = "light", to = "/", context }: BrandLogoProps) {
|
|
return (
|
|
<Link to={to} className={`${styles.root} ${styles[tone]}`}>
|
|
<img
|
|
className={styles.logo}
|
|
src={tone === "dark" ? logoOnDark : logoOnLight}
|
|
alt="ФСП"
|
|
width="345"
|
|
height="116"
|
|
/>
|
|
<span className={styles.divider} aria-hidden="true" />
|
|
<span className={styles.name}>
|
|
Lincodex
|
|
{context ? <span className={styles.context}>{context}</span> : null}
|
|
</span>
|
|
</Link>
|
|
);
|
|
}
|