fjohanssondev / podcast-app

https://podcast-app-henna.vercel.app
0 stars 0 forks source link

Build the Button component #1

Open fjohanssondev opened 11 months ago

fjohanssondev commented 11 months ago

We need to build a Button-component that supports all our different buttons. Refer to Figma for the current design.

When creating this component. Please review Josh video on creating a reusable component (he actually creates a button, but this applies to all sorts of components probably): https://www.youtube.com/watch?v=eXRlVpw1SIQ&ab_channel=Joshtriedcoding

The button should have atleast the variant prop on it. So we can choose wether this component is the primary | secondary | tertiary etc..

The packages: clsx, class-variance-authority and tailwind-merge has already been installed.

fjohanssondev commented 11 months ago

Add support for a isLoading prop. A button will be receiving this prop sometimes from React Query.

Design not ready. But will probably show a loading-spinner instead of text in the button.