Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
function EnrollMfaModal(props: EnrollMfaModalProps): Element;
props
EnrollMfaModalProps
Element
// Render the EnrollMfaModal component with a custom success handler function App() { const handleSuccess = (mfaCode: string) => { console.log(`Successfully verified`, mfaCode); }; return ( <CDPReactProvider config={config}> <EnrollMfaModal onSuccess={handleSuccess} /> </CDPReactProvider> ); }
// Render the EnrollMfaModal component with a custom trigger button function App() { return ( <CDPReactProvider config={config}> <EnrollMfaModal> <button type="button">Verify</button> </EnrollMfaModal> </CDPReactProvider> ); }
// Render the EnrollMfaModal component with a custom trigger button label function App() { return ( <CDPReactProvider config={config}> <EnrollMfaModal> <EnrollMfaModalTrigger variant="secondary" label="Verify" /> </EnrollMfaModal> </CDPReactProvider> ); }
// Render the EnrollMfaModal with controlled open state function App() { const [isOpen, setIsOpen] = useState(false); return ( <CDPReactProvider config={config}> <EnrollMfaModal open={isOpen} setIsOpen={setIsOpen}> <EnrollMfaModalTrigger /> <EnrollMfaModalContent /> </EnrollMfaModal> </CDPReactProvider> ); }
Was this page helpful?