Cleaninig sample code
This commit is contained in:
1 parent
67c1dba5d8
commit
4f4447f142
1 file changed
-17
@@ -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
|
||||
Reference in new issue
Block a user