plane icon indicating copy to clipboard operation
plane copied to clipboard

refactor: Improve code structure and props in buttons components

Open sanyamjain04 opened this issue 1 year ago • 3 comments

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 avatar Apr 22 '23 07:04 sanyamjain04

@sanyamjain04 is attempting to deploy a commit to the Caravel Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Apr 22 '23 07:04 vercel[bot]

Hello, I was wondering if there were any updates on the status of my pull request. Thank you for your time

@aaryan610

sanyamjain04 avatar May 05 '23 12:05 sanyamjain04

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.

aaryan610 avatar May 05 '23 13:05 aaryan610

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.

aaryan610 avatar Jul 04 '23 18:07 aaryan610