UNPKG

@rocket.chat/onboarding-ui

Version:

Set of components and functions for the onboarding experience on Rocket.Chat

17 lines 1.47 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); const layout_1 = require("@rocket.chat/layout"); const react_i18next_1 = require("react-i18next"); const LoginForm_1 = __importDefault(require("../../forms/LoginForm")); const TotpForm_1 = __importDefault(require("../../forms/TotpForm")); const LoginPage = ({ onCreateAccount, ...props }) => { const { t } = (0, react_i18next_1.useTranslation)(); const { isMfa, mfaProps } = props; return ((0, jsx_runtime_1.jsxs)(layout_1.VerticalWizardLayout, { children: [(0, jsx_runtime_1.jsx)(layout_1.VerticalWizardLayoutTitle, { children: t('page.loginPage.title.cloud') }), (0, jsx_runtime_1.jsx)(layout_1.VerticalWizardLayoutForm, { children: isMfa && !!mfaProps ? ((0, jsx_runtime_1.jsx)(TotpForm_1.default, { ...mfaProps })) : ((0, jsx_runtime_1.jsx)(LoginForm_1.default, { ...props })) }), (0, jsx_runtime_1.jsx)(layout_1.VerticalWizardLayoutFooter, { children: !isMfa && ((0, jsx_runtime_1.jsxs)(react_i18next_1.Trans, { i18nKey: 'page.loginPage.createAccount.label', children: ["New here?", (0, jsx_runtime_1.jsx)(layout_1.ActionLink, { fontScale: 'p2', onClick: onCreateAccount, children: "Create account" })] })) })] })); }; exports.default = LoginPage; //# sourceMappingURL=LoginPage.js.map