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.