CompanyRegistration Container
Overview
The CompanyRegistration container component for the drop-in.
Version: 1.0.0-beta16
Configuration
The CompanyRegistration container provides the following configuration options:
| Parameter | Type | Req? | Description |
|---|---|---|---|
isAuthenticated | boolean | No | Whether the authenticated state is active |
onRedirectLogin | () => void | No | Callback function triggered when redirect login |
onRedirectAccount | () => void | No | Callback function triggered when redirect account |
onSuccess | (company: Company) => void | No | Callback function triggered when success |
onError | (errors: string[]) => void | No | Callback function triggered when error |
className | string | No | Additional CSS classes to apply to the container |
Slots
This container exposes the following slots for customization:
| Slot | Type | Required | Description |
|---|---|---|---|
slots | CompanyFormSlots | No | Custom slot for rendering slots |
Usage
The following example demonstrates how to use the CompanyRegistration container:
import { CompanyRegistration } from '@dropins/storefront-company-management';
export default function MyComponent() { return ( <CompanyRegistration isAuthenticated={true} onRedirectLogin={() => console.log('RedirectLogin')} onRedirectAccount={() => console.log('RedirectAccount')} /> );}