ng-cw-v12
Version:
Angular UI Component Library
33 lines (32 loc) • 1.4 kB
TypeScript
import { ElementRef, Renderer2, OnInit } from '@angular/core';
import * as i0 from "@angular/core";
export declare class MagicCardDirective implements OnInit {
private el;
private renderer;
/** 渐变大小,单位px */
ncGradientSize: number;
/** 内部渐变颜色,可以是单色或颜色数组 */
ncGradientColor: string | string[];
/** 内部渐变透明度 */
ncGradientOpacity: number;
/** 边框颜色,可以是单色或颜色数组 */
ncBorderColor: string | string[];
/** 卡片背景颜色 */
ncCardBackground: string;
private mouseX;
private mouseY;
private borderElement;
private backgroundElement;
private gradientElement;
private handleMouseEnter;
private handleMouseMove;
private handleMouseLeave;
constructor(el: ElementRef, renderer: Renderer2);
ngOnInit(): void;
private setupMagicCard;
private addEventListeners;
private initializeMousePosition;
private updateGradients;
static ɵfac: i0.ɵɵFactoryDeclaration<MagicCardDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<MagicCardDirective, "[ncMagicCard]", never, { "ncGradientSize": "ncGradientSize"; "ncGradientColor": "ncGradientColor"; "ncGradientOpacity": "ncGradientOpacity"; "ncBorderColor": "ncBorderColor"; "ncCardBackground": "ncCardBackground"; }, {}, never>;
}