mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 08:13:49 +10:00
refactor(v4.0.0-alpha): beginning of a new era
This commit is contained in:
32
apps/client/src/components/logo.tsx
Normal file
32
apps/client/src/components/logo.tsx
Normal file
@ -0,0 +1,32 @@
|
||||
import { useTheme } from "@reactive-resume/hooks";
|
||||
import { cn } from "@reactive-resume/utils";
|
||||
|
||||
type Props = {
|
||||
size?: number;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export const Logo = ({ size = 32, className }: Props) => {
|
||||
const { isDarkMode } = useTheme();
|
||||
|
||||
let src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
|
||||
|
||||
switch (isDarkMode) {
|
||||
case false:
|
||||
src = "/logo/light.svg";
|
||||
break;
|
||||
case true:
|
||||
src = "/logo/dark.svg";
|
||||
break;
|
||||
}
|
||||
|
||||
return (
|
||||
<img
|
||||
src={src}
|
||||
width={size}
|
||||
height={size}
|
||||
alt="Reactive Resume"
|
||||
className={cn("rounded-sm", className)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user