I am wondering, is it possible to create a global prop in react -- i.e., a prop that works with any component (just like I can use className
with any component)?
For example, a flex
property that I could call on any component that would have set behavior -- like this:
<Header flex>...</Header>
In this case, it would set display: flex;
. This is just a theoretical example. My question is whether or not this is possible -- and, if so, how to do it?
Any ideas?