UNPKG

@pagamio/frontend-commons-lib

Version:

Pagamio library for Frontend reusable components like the form engine and table container

16 lines (15 loc) 1.36 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Card } from 'flowbite-react'; const AuthPageLayout = ({ title, subtitle, errorMessage, logo, 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 && logo, _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", { children: [_jsx("h2", { className: "text-[1.5em] font-bold text-gray-900 dark:text-white sm:text-[1.875em]", children: title }), _jsx("h2", { className: "text-[1em] font-medium text-gray-600 dark:text-white sm:text-[1em]", 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;