plane
plane copied to clipboard
refactor: Improve code structure and props in buttons components
Changes Made
-
Updated ButtonProps type definition to extend from ButtonHTMLAttributes for better type checking and auto-completion.
-
This PR enables the Button component in application to support forwardRef. This means that the Button component can now receive a ref from other components using the React.forwardRef function.
-
Refactored the component to use object destructuring to extract the relevant props, which can make the code more readable and maintainable. Additionally, I've added default prop values and a display name to the component.
@sanyamjain04 is attempting to deploy a commit to the Caravel Team on Vercel.
A member of the Team first needs to authorize it.
Hello, I was wondering if there were any updates on the status of my pull request. Thank you for your time
@aaryan610
Hi, @sanyamjain04, thanks for raising this PR. We have reviewed it and it looks good, but due to the aggressive development and releases going on, we have not been able to test and merge the PR. We'll make sure to test your PR and merge it asap.
Thanks for contributing to Plane.
Hi, @sanyamjain04, we are going to completely revamp our button components so this PR will not be of use to us, also, using forwardRef
for a button component seemed to be too complex.
But, we'll definitely take inspiration from you on how you've used the props. Thank you for your contribution.