import { Input } from '@affine/admin/components/ui/input'; import { Label } from '@affine/admin/components/ui/label'; import { useCallback } from 'react'; type CreateAdminProps = { name: string; email: string; password: string; invalidEmail: boolean; invalidPassword: boolean; passwordLimits: { minLength: number; maxLength: number; }; onNameChange: (name: string) => void; onEmailChange: (email: string) => void; onPasswordChange: (password: string) => void; }; export const CreateAdmin = ({ name, email, password, invalidEmail, invalidPassword, passwordLimits, onNameChange, onEmailChange, onPasswordChange, }: CreateAdminProps) => { const handleNameChange = useCallback( (event: React.ChangeEvent) => { onNameChange(event.target.value); }, [onNameChange] ); const handleEmailChange = useCallback( (event: React.ChangeEvent) => { onEmailChange(event.target.value); }, [onEmailChange] ); const handlePasswordChange = useCallback( (event: React.ChangeEvent) => { onPasswordChange(event.target.value); }, [onPasswordChange] ); return (

Create Administrator Account

This account can also be used to log in as an AFFiNE user.

Invalid email address.

{invalidPassword ? 'Invalid password. ' : ''}Please enter{' '} {String(passwordLimits.minLength)}- {String(passwordLimits.maxLength)} digit password, it is recommended to include 2+ of: uppercase, lowercase, numbers, symbols.

); };