Skip to main content

FormField

FormField

A wrapper around form fields which provides a label, tooltip and error message.

Example

import { FormField } from '@vendure/admin-ui/react';

export function MyReactComponent() {
return (
<FormField label="My field" tooltip="This is a tooltip" invalid errorMessage="This field is invalid">
<input type="text" />
</FormField>
);
}
Signature
function FormField(props: PropsWithChildren<{
for?: string;
label?: string;
tooltip?: string;
invalid?: boolean;
errorMessage?: string;
}>): void

Parameters

props

parameter
PropsWithChildren<{ for?: string; label?: string; tooltip?: string; invalid?: boolean; errorMessage?: string; }>