0

I'm a newbie in React and I implemented a stateless component, (a "card") which I use very often. But I need it to be available in 3 different widths : Small, medium and large. I was wondering what was the best way to implement it? My first idea was to simply create a component corresponding to each size. But it would be duplicating code :/ Then I thought about giving the size as an argument but it seems... strange?

0 Answers0