UNPKG

bananas-commerce-admin

Version:

What's this, an admin for apes?

41 lines 1.72 kB
import React from "react"; import Backdrop from "@mui/material/Backdrop"; import Dialog from "@mui/material/Dialog"; import DialogTitle from "@mui/material/DialogTitle"; import { styled } from "@mui/material/styles"; import Typography from "@mui/material/Typography"; import Brand from "../components/Brand"; import Content from "../containers/Content"; import LoginForm from "../forms/LoginForm"; const StyledDialog = styled(Dialog, { name: "BananasLoginDialog", slot: "Root", })(() => ({})); const StyledDialogTitle = styled(DialogTitle, { name: "BananasLoginDialog", slot: "Title", })(({ theme }) => theme.unstable_sx({ bgcolor: "primary.main", color: "primary.contrastText", })); const StyledBackdrop = styled(Backdrop, { name: "BananasLoginDialog", slot: "Backdrop", })(({ theme }) => theme.unstable_sx({ bgcolor: "primary.dark", m: 0, p: 2, textAlign: "center", alignItems: "middle", justifyContent: "center", display: "flex", })); export const LoginPage = ({ title, logo, form: Form, logoHeight }) => { Form ??= LoginForm; return (React.createElement(Content, { layout: "fullWidth" }, React.createElement(StyledDialog, { open: true, BackdropComponent: StyledBackdrop, PaperProps: { elevation: 1 }, sx: { "> * > *": { width: "100%" } } }, React.createElement(StyledDialogTitle, null, logo ? (React.createElement(Brand, { LogoProps: { style: { width: "auto", height: logoHeight ?? "24px !important" } }, src: logo })) : (React.createElement(Typography, { sx: { fontWeight: "bold", color: "inherit" } }, title))), React.createElement(Form, null)))); }; export default LoginPage; //# sourceMappingURL=LoginPage.js.map