Skip to main content
Version: 3.14.0

Introduction

A container is the low level logic layer for any modal. It contains the inner state & business logic of each flow.
Works best if you need that ultimate configuration experience. Otherwise, stick to our modals implementation.

Example#

The container wraps inner components and acts as a provider.

import React from "react";
import {
LoginContainer,
LoginEmail,
LoginPassword,
LoginButton,
Alert,
} from "@pelcro/react-pelcro-js";
export const CustomLoginView = () => {
return (
<LoginContainer
onSuccess={(userObject) => {
console.log(userObject);
}}
onFailure={(err) => {
console.error(err.message);
}}
>
<Alert />
<LoginEmail label="Email" />
<LoginPassword label="Password" />
<LoginButton />
</LoginContainer>
);
};

Available Containers#