Skip to content

setExternalStyles

Import

import { setExternalStyles } from 'c/bolt';

Usage

export default class myLwc extends LightningElement {
renderedCallback() {
setExternalStyles('')
}
}

Methods

setExternalStyles(styles) : void

NameTypeDescription
stylesstringCss declaration as a string

Example

export default class myLwc extends LightningElement {
renderedCallback() {
setExternalStyles('p { color: red}').bind(this);
}
}
<template>
<div lwc:ref="style"></div>
</template>