I have the following page:
import ParentComponent from '../components/ParentComponent';
import ChildComponent from '../components/ChildComponent';
const Page = () => {
return (
<ParentComponent color="white">
<ChildComponent />
</ParentComponent>
);
}
export default Page;
Is there a way to access the color prop on the ParentComponent
from inside the ChildComponent
so I can manipulate some things based on if it's set to 'white'?
I haven't tried anything yet, please help!