2022-12-27 18:16:05 +01:00
|
|
|
const opacity = {
|
|
|
|
light: 70,
|
|
|
|
dark: 60,
|
|
|
|
hax0r: 90,
|
|
|
|
lgbtq: 80,
|
|
|
|
}
|
|
|
|
|
2023-01-29 16:44:02 +01:00
|
|
|
export const SusiWrapper = ({ theme, children, error = false }) => (
|
2022-12-27 18:16:05 +01:00
|
|
|
<section
|
|
|
|
style={{
|
2022-12-27 18:20:53 +01:00
|
|
|
backgroundImage: `url('https://static.freesewing.org/img/splash/${theme || 'light'}.jpg')`,
|
2022-12-27 18:16:05 +01:00
|
|
|
backgroundSize: 'cover',
|
|
|
|
backgroundPosition: '40% 50%',
|
|
|
|
}}
|
|
|
|
className="m-0 p-0 shadow drop-shadow-lg w-full h-screen"
|
|
|
|
>
|
|
|
|
<div className="flex flex-col items-center justify-center h-screen mt-4 lg:mt-12 max-w-md m-auto pb-32">
|
|
|
|
<div
|
2023-01-17 21:11:16 +01:00
|
|
|
className={`${error ? 'bg-error' : 'bg-neutral'} bg-opacity-${
|
|
|
|
opacity[theme]
|
2023-03-19 19:03:51 +01:00
|
|
|
} text-neutral-content rounded-none sm:rounded-lg py-4 px-8 drop-shadow w-full`}
|
2022-12-27 18:16:05 +01:00
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
)
|