quivr/frontend/lib/assets/QuivrLogo.tsx

31 lines
584 B
TypeScript
Raw Normal View History

import Image from "next/image";
interface QuivrLogoProps {
size: number;
2024-01-31 00:34:32 +03:00
color?: "white" | "black" | "primary" | "accent";
}
export const QuivrLogo = ({
size,
color = "white",
}: QuivrLogoProps): JSX.Element => {
2024-01-31 00:34:32 +03:00
let src = "/logo-white.svg";
if (color === "primary") {
src = "/logo-primary.svg";
} else if (color === "accent") {
src = "/logo-accent.svg";
}
const filter = color === "black" ? "invert(1)" : "none";
return (
<Image
src={src}
alt="Quivr Logo"
width={size}
height={size}
style={{ filter }}
/>
);
};