The problem
You have a ⚛ higher order component(HoC) like this:
You need to pass the prop color
inside the children of the Parent
component.
cloneElement to the rescue
One straight forward solution as described here is to clone the children and inject our desired props!
There was another approach using context with some caveats, but the bottom line is context and props are just not the same thing.