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.
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
.