Your Success component returns an array of elements. Reusing it in different components with different css layout would require wrapping it each time with something like <div className="foo-bar"><Success /></div>.
Instead your <Success> component should return a div and optionally accept className prop.
I don't understand. I didn't propose that at all?
Your
Success
component returns an array of elements. Reusing it in different components with different css layout would require wrapping it each time with something like<div className="foo-bar"><Success /></div>
.Instead your
<Success>
component should return adiv
and optionally acceptclassName
prop.use a Fragment?
Fragment is not an element, it doesn't accept
className
.