Trendyol / baklava

Baklava is a design system provided by Trendyol to create a consistent UI/UX for app users.
https://baklava.design/
MIT License
1.25k stars 110 forks source link

[Feature Request]: Support for zod & react-hook-form #763

Open alpgokcek opened 8 months ago

alpgokcek commented 8 months ago

Describe the problem or use case

When using the Baklava in React with the external libraries zod and react-hook-form, I encountered issues with compatibility. react-hook-form helps us to create forms with validation really quick and is used by many people. When we are registering components in react-hook-form it generates onChange and onBlur functions which is only a getter method for Baklava.

Proposed solution

To increase the usage of Baklava Design System in React community we should make these libraries compatible.

Alternatives considered

No response

Additional technical context

No response

AykutSarac commented 7 months ago

Hello, can you share your code to reproduce?

Enes5519 commented 3 weeks ago

You need to write a wrapper component to use Baklava and react-hook-form together. Example Sandbox: https://stackblitz.com/edit/baklava-react-hook-form?file=src%2Fcomponents%2FInput.tsx