pagamio-frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
17 lines (16 loc) • 1.5 kB
JavaScript
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Card } from 'flowbite-react';
const AuthPageLayout = ({ title, subtitle, errorMessage, showLogo = true, renderInAppLayout = false, children, }) => {
return (_jsxs("div", { className: `mx-auto flex w-full max-w-[640px] flex-col items-center justify-center px-4 py-8 sm:px-6 ${renderInAppLayout ? 'h-[calc(100vh-64px)]' : 'min-h-screen md:h-screen'}`, children: [showLogo && (_jsx("img", { alt: "Pagamio Logo", src: "/images/pagamio-full-colored-logo.svg", width: 280, height: 250, className: "mb-[2.5em]" })), _jsxs(Card, { horizontal: true, className: "w-full p-2 sm:p-3", theme: {
root: {
children: 'my-auto w-full gap-0 space-y-6 p-4 sm:p-6 lg:p-12',
},
img: {
horizontal: {
on: 'hidden w-2/3 rounded-l-lg md:w-96 md:p-0 lg:block',
},
},
}, children: [_jsxs("div", { className: "space-y-2", children: [_jsx("h2", { className: "text-[1.5em] sm:text-[1.875em] font-bold text-gray-900 dark:text-white", children: title }), _jsx("p", { className: "text-[1em] font-medium text-gray-600 dark:text-white", children: subtitle })] }), errorMessage && (_jsx("div", { className: "mt-4 rounded border border-red-400 bg-red-100 p-2 text-red-700", children: errorMessage })), children] })] }));
};
export default AuthPageLayout;