beaucouplus / calendar

Let's practice React and learn tailwind css along the way!
0 stars 0 forks source link

Create a reusable Button component #10

Open beaucouplus opened 4 years ago

beaucouplus commented 4 years ago

I think using children and callBack are 2 good ideas, as it allows a lot of flexibility around the component.

Right now, the button is pretty much styled for one context only, which totally defeats reusability. Using css as props would probably make things easier, but I wonder if it works well in the long run.

Should I always give the component CSS to consume or should I create different types of Buttons? Like stealthyButton? Also, is a button the best html element to be used in the current situation?

🤔

Originally posted by @beaucouplus in https://github.com/beaucouplus/calendar/pull/9

beaucouplus commented 4 years ago

I'm halfway there, waiting for a new button need to pop before working on this again.

beaucouplus commented 4 years ago

I might have to split css responsibilities to handle several button styles. As a first step, I might have to deal with: