EddieHubCommunity / BioDrop

Connect to your audience with a single link. Showcase the content you create and your projects in one place. Make it easier for people to find, follow and subscribe.
https://biodrop.io
MIT License
5.72k stars 3.94k forks source link

refactor: button component #10165

Open sital002 opened 9 months ago

sital002 commented 9 months ago

Fixes Issue

Changes proposed

Refactor button component

  1. Added cva and tailwind merge currently it is very hard to follow the style due to alot of optional chaining.
  2. Added jsdocs for type safety
  3. currently we can't use ref on the button component so using forward ref so that the button component can be selected.

Check List (Check all the applicable boxes)

Screenshots

Note to reviewers

sital002 commented 9 months ago

Currently the all the button have default style if you approve that we should implement these library and use js doc for type safety I will replace all the button props from primary=true to variant=primary What do you think @eddiejaoude If we are planning to use Typescript in the future then we don't need js doc but if not i think we should use js doc where it makes more sense

eddiejaoude commented 9 months ago

This looks interesting, I am worried about the file limit with Vercel by adding more dependencies because are approaching the limit already