Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/components/auth/fragments/auth-page-container.tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { ReactNode } from "react";6import { Alert } from "antd";78import { COLORS } from "@cocalc/util/theme";9import Logo from "components/logo";1011import { BODY_STYLE, LOGIN_STYLE, AUTH_WRAPPER_STYLE } from "../shared";121314interface AuthPageContainerProps {15children: ReactNode;16error?: ReactNode;17footer?: ReactNode;18minimal?: boolean;19subtitle?: ReactNode;20title: string;21}2223export default function AuthPageContainer(props: AuthPageContainerProps) {24const {25children,26error ,27footer,28minimal = false,29subtitle,30title,31} = props;3233return (34<div style={BODY_STYLE}>35<div style={AUTH_WRAPPER_STYLE}>36{!minimal && (37<div style={{38textAlign: "center",39marginBottom: "15px",40color: COLORS.GRAY_D,41}}>42<Logo43type="icon"44style={{ width: "100px", height: "100px", marginBottom: "15px" }}45priority={true}46/>47<h2>{title}</h2>48{subtitle}49</div>50)}5152<div style={LOGIN_STYLE}>53{children}54</div>5556{error && (57<>58<Alert59style={{ marginTop: "20px" }}60message="Error"61description={error}62type="error"63showIcon64/>65</>66)}6768{footer && (69<div style={{70margin: `${ BODY_STYLE.margin } auto`,71padding: "8px",72}}73>74{footer}75</div>76)}77</div>78</div>79);80}818283