The Button components currently do not allow the form prop. This is used to allow a button to be placed outside a form, but still be associated with the form.
To Reproduce
<Button
onClick={() => {}}
variant={VARIANT.BASE}
form="myform"
>
Click Me
</Button>
Expected Behavior
The JSX expression should compile
Actual Behavior
The error
Type '{ children: string; onClick: () => void; variant: VARIANT.BASE; form: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps & { children?: ReactNode; }'.
Property 'form' does not exist on type 'IntrinsicAttributes & ButtonProps & { children?: ReactNode; }'
was thrown because ButtonProps does not fully implement all the props permitted by a regular browser button
Description
The
Button
components currently do not allow theform
prop. This is used to allow a button to be placed outside a form, but still be associated with the form.To Reproduce
Expected Behavior
The JSX expression should compile
Actual Behavior
The error
was thrown because
ButtonProps
does not fully implement all the props permitted by a regular browser button