Allows username to be optional when using the new loginWithUsername
feature. This can be done by the following:
```ts
auth: {
loginWithUsername: {
requireUsername: false, // <-- new property, default true
requireEmail: false, // default: false
allowEmailLogin: true, // default false
},
},
```
22 lines
705 B
TypeScript
22 lines
705 B
TypeScript
import type { CheckboxFieldValidation } from '../../fields/validations.js'
|
|
import type { ErrorComponent } from '../forms/Error.js'
|
|
import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'
|
|
|
|
export type CheckboxFieldProps = {
|
|
checked?: boolean
|
|
disableFormData?: boolean
|
|
id?: string
|
|
name?: string
|
|
onChange?: (val: boolean) => void
|
|
partialChecked?: boolean
|
|
path?: string
|
|
validate?: CheckboxFieldValidation
|
|
width?: string
|
|
} & FormFieldBase
|
|
|
|
export type CheckboxFieldLabelComponent = LabelComponent<'checkbox'>
|
|
|
|
export type CheckboxFieldDescriptionComponent = DescriptionComponent<'checkbox'>
|
|
|
|
export type CheckboxFieldErrorComponent = ErrorComponent<'checkbox'>
|