mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
Chore/remove usage of mantine color scheme (#6108)
Remove instances of `colorScheme === "dark" ?` in the app and rely on the theme.css' light and dark variables instead.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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} />;
|
||||
}
|
||||
Reference in New Issue
Block a user