diff --git a/docs/elements/reference/common.mdx b/docs/elements/reference/common.mdx index bf6ee02f22..d434a2cf88 100644 --- a/docs/elements/reference/common.mdx +++ b/docs/elements/reference/common.mdx @@ -117,7 +117,7 @@ If you use ``, additional information in | Name | Type | Description | | - | - | - | -| `children` | `(args: { state: 'success' \| 'error' \| 'warning' \| 'info' \| 'idle'; message: string \| undefined; codes: ErrorMessageKey[] \| undefined }) => React.ReactNode` | Use this function to access the field's state. Optionally, information regarding password validation is given. | +| `children` | `(args: { state: 'success' \| 'error' \| 'warning' \| 'info' \| 'idle'; message: string \| undefined; codes: (string \| [string, Record])[] \| undefined }) => React.ReactNode` | Use this function to access the field's state. Optionally, information regarding password validation is given. | ### Usage {{ toc: false }} @@ -137,8 +137,10 @@ If you use ``, additional information in If you're using [``](#input-type-password), the ``'s children function receives additional arguments: -- `message` - The standardized English message generated for the current state of the input. This message is generated based on the codes associated with the ``. -- `codes` - The codes associated with the ``. You can use these codes to return custom `message` or localize its contents. +| Name | Type | Description | +| - | - | - | +| `message` | `string` | The standardized English message generated for the current state of the input. This message is generated based on the codes associated with the ``. | +| `codes` | `(string \| [string, Record])[]` | The error codes associated with the ``. You can use these codes to return a custom `message` or localize its contents. | Initially, the `` will have a `state` of `idle` until the user interacts with the input. Depending on the user's input, the `state` will change to `'success' | 'error' | 'warning' | 'info'`. @@ -151,7 +153,7 @@ Initially, the `` will have a `state` of `idle` until the user interacts
Field state: {state}
Field msg: {message}
-
Codes: {codes?.join(', ')}
+
Codes: {JSON.stringify(codes, null, 2)}
)}