mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 10:34:06 +02:00
Remove instances of `colorScheme === "dark" ?` in the app and rely on the theme.css' light and dark variables instead.
15 lines
508 B
TypeScript
15 lines
508 B
TypeScript
import React from "react";
|
|
import { useMantineColorScheme } from "@mantine/core";
|
|
import { useLogoPath } from "@app/hooks/useLogoPath";
|
|
|
|
interface LogoIconProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
alt?: string;
|
|
}
|
|
|
|
export function LogoIcon({ alt = "", ...props }: LogoIconProps) {
|
|
const { colorScheme } = useMantineColorScheme();
|
|
const logoPaths = useLogoPath();
|
|
const src = colorScheme === "dark" ? logoPaths.dark : logoPaths.light;
|
|
return <img src={src} alt={alt} {...props} />;
|
|
}
|