fastpocket/Frontend/components/Utilities/Background.tsx

31 lines
649 B
TypeScript

import React, { ReactNode, useEffect, useState } from "react";
import Image from "next/image";
const Background = ({
children,
className,
}: {
children: ReactNode;
className?: string;
}) => {
// const { theme } = useTheme();
return (
<div
className={"h-full relative w-full bg-center bg-no-repeat bg-cover bg-fixed flex flex-col " + className}
>
<Image
src={"/images/gradient.webp"}
alt="background"
layout="fill"
objectFit="cover"
objectPosition="center"
priority
/>
<div className="z-10">{children}</div>
</div>
);
};
export default Background;