Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Button Type does not allow HTML Form name and value #67

Closed
cmgriffing opened this issue Mar 17, 2022 · 1 comment · Fixed by #69
Closed

Button Type does not allow HTML Form name and value #67

cmgriffing opened this issue Mar 17, 2022 · 1 comment · Fixed by #69

Comments

@cmgriffing
Copy link

The Button Type does not allow a name or value prop when using TypeScript.

I am not sure if this is Vechai problem or an issue with the base React Type.

However, I am currently having to do this in a Remix.run site:

<Form method="post">
  <input
    name="foo"
    type="hidden"
    value="bar"
  />
  <Button variant="solid">
    No
  </Button>
</Form>

With the name and value props I could do this:

<Form method="post">
  <Button name="foo" value="bar" variant="solid">
    No
  </Button>
</Form>
@cmgriffing
Copy link
Author

Awesome thanks. I agree that the more accurate type is a cleaner solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants