I would like to know what is the best way to style child components depending on its parent component. For example, I want to create a list component to be used in a dropdown popup as well as in a toolbar. Depending on which parent component it is in, it is styled differently.
For me there are various ways to solve this. But I don't know the best practice for enterprise applications.

the second way is and I don,t recommend you this
that you write all css styles of your components in the page which you use your components inside this
