[Vuejs]-How to bind a class that came from another component as a prop

0๐Ÿ‘

โœ…

So you have parent component:

<child-component :bgColor="childBgColor"></child-component>

And in child component:

<div v-bind:style="{ background-color: bgColor }">
</div>
props: {
 bgColor: String,
}

Leave a comment