Cleaninig sample code

This commit is contained in:
Luis Fernando Molina committed 2018-09-09 11:36:02 +02:00
1 parent 67c1dba5d8
commit 4f4447f142
1 file changed
-17
-17
View File
@@ -1,17 +0,0 @@
import React from 'react'
const Rainbow = (WrappedComponent) => {
const colours = ['red', 'pink', 'orange', 'blue', 'green', 'yellow'];
const randomColour = colours[Math.floor(Math.random() * 6)];
const className = randomColour + '-text';
return (props) => (
<div className={className}>
<WrappedComponent {...props} />
</div>
)
}
export default Rainbow