Level 104
Use backticks for String Interpolation.
borderLeft: `10px solid ${this.colour}`
I'm trying to use an object to control the style of certain parts of an app as I'm trying to avoid inline styling. What how do I use Colour from props in the styling object below please?
data: () => ({
props: ['header', 'questions', 'index', 'colour'],
sectionScore: [],
styling: {
borderLeft: '10px solid ${this.colour}'
}
}),
I'm using the object in the main body with :style="styling".
Please or to participate in this conversation.