Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toCSSUnit(value: number | string = ''): string {
return toCssPixel(value);
}
setConfig(config?: NzMessageConfigLegacy): void {
this.config = this.mergeMessageConfig(config);
this.top = toCssPixel(this.config.nzTop);
this.cdr.markForCheck();
}
setConfig(config?: NzNotificationConfigLegacy): void {
const newConfig = (this.config = {
...this.config,
...config,
...this.nzConfigService.getConfigForComponent(NZ_CONFIG_COMPONENT_NAME)
});
const placement = this.config.nzPlacement;
this.top = placement === 'topLeft' || placement === 'topRight' ? toCssPixel(newConfig.nzTop) : null;
this.bottom = placement === 'bottomLeft' || placement === 'bottomRight' ? toCssPixel(newConfig.nzBottom) : null;
this.cdr.markForCheck();
}
get width(): string | null {
return this.isLeftOrRight ? toCssPixel(this.nzWidth) : null;
}
setConfig(config?: NzNotificationConfigLegacy): void {
const newConfig = (this.config = {
...this.config,
...config,
...this.nzConfigService.getConfigForComponent(NZ_CONFIG_COMPONENT_NAME)
});
const placement = this.config.nzPlacement;
this.top = placement === 'topLeft' || placement === 'topRight' ? toCssPixel(newConfig.nzTop) : null;
this.bottom = placement === 'bottomLeft' || placement === 'bottomRight' ? toCssPixel(newConfig.nzBottom) : null;
this.cdr.markForCheck();
}
get height(): string | null {
return !this.isLeftOrRight ? toCssPixel(this.nzHeight) : null;
}
get widthSetting(): string {
if (this.nzCollapsed) {
return `${this.nzCollapsedWidth}px`;
} else {
return toCssPixel(this.nzWidth);
}
}