Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private setClass() {
const { el, doc, renderer, settings } = this;
const layout = settings.layout;
updateHostClass(el.nativeElement, renderer, {
['alain-default']: true,
[`alain-default__fixed`]: layout.fixed,
[`alain-default__collapsed`]: layout.collapsed,
});
doc.body.classList[layout.colorWeak ? 'add' : 'remove']('color-weak');
}
private setClass() {
const { el, doc, renderer, settings } = this;
const layout = settings.layout;
updateHostClass(
el.nativeElement,
renderer,
{
['alain-default']: true,
[`alain-default__fixed`]: layout.fixed,
[`alain-default__collapsed`]: layout.collapsed,
},
);
doc.body.classList[layout.colorWeak ? 'add' : 'remove']('color-weak');
}
private setClass() {
const { el, doc, renderer, settings } = this;
const layout = settings.layout;
updateHostClass(
el.nativeElement,
renderer,
{
['alain-default']: true,
[`alain-default__fixed`]: layout.fixed,
[`alain-default__collapsed`]: layout.collapsed,
},
);
doc.body.classList[layout.colorWeak ? 'add' : 'remove']('color-weak');
}
private setCls() {
const { el, rend, hasLegend, isPercent } = this;
const ne = el.nativeElement as HTMLElement;
updateHostClass(
ne,
rend,
{
'g2-pie': true,
'g2-pie__legend-has': hasLegend,
'g2-pie__legend-block': hasLegend && ne.clientWidth <= 380,
'g2-pie__mini': isPercent,
},
true,
);
}
private setClass() {
const { el, doc, renderer, settings } = this;
const layout = settings.layout;
updateHostClass(
el.nativeElement,
renderer,
{
['alain-default']: true,
[`alain-default__fixed`]: layout.fixed,
[`alain-default__collapsed`]: layout.collapsed,
},
);
doc.body.classList[layout.colorWeak ? 'add' : 'remove']('color-weak');
}
private setClass() {
const { el, ren, size, layout } = this;
updateHostClass(el, ren, {
[`${prefixCls}__container`]: true,
[`${prefixCls}__${size}`]: true,
[`${prefixCls}__${layout}`]: true,
[`clearfix`]: true,
});
}
setClass() {
const classMap = {
['ad-standard-form-row']: true,
['block']: this.block,
['grid']: this.grid,
['last']: this.last,
};
updateHostClass(this.el.nativeElement, this.renderer, classMap);
}