diff --git a/package.json b/package.json index 12f797a..de43ad0 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "publish": "cd dist/up-window-angular && npm publish", "watch": "ng build --watch --configuration development", "test": "ng test", + "test:module": "ng test up-window-angular", "postbuild": "node scripts/post-build.js" }, "private": true, diff --git a/projects/up-window-angular/src/lib/up-window-angular.component.html b/projects/up-window-angular/src/lib/up-window-angular.component.html index 63ca76a..2dbcc31 100644 --- a/projects/up-window-angular/src/lib/up-window-angular.component.html +++ b/projects/up-window-angular/src/lib/up-window-angular.component.html @@ -1,17 +1,13 @@ -
-
- +
+
+
-
-

{{ title }}

-

{{ subtitle }}

-
+

{{ title }}

+

{{ subtitle }}

-
-
- - Modal Example content! + Fade Example content! + + + + + Slide Example content! + + + + + Slide Up Example content! + + + + + Slide Down Example content! + + + + + Scale Example content!
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 62238a9..213ab72 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -28,10 +28,36 @@ export class AppComponent { codeString: string = ''; isModalActive: boolean = false; - isModalOpenExample: WritableSignal = signal(false); + isWindowOpenFade: WritableSignal = signal(false); + isWindowOpenSlide: WritableSignal = signal(false); + isWindowOpenSlideUp: WritableSignal = signal(false); + isWindowOpenSlideDown: WritableSignal = signal(false); + isWindowOpenScale: WritableSignal = signal(false); - openModalExample() { - this.isModalOpenExample.set(true); + openWindowExample(animation: string) { + this.isWindowOpenFade.set(false); + this.isWindowOpenSlide.set(false); + this.isWindowOpenSlideUp.set(false); + this.isWindowOpenSlideDown.set(false); + this.isWindowOpenScale.set(false); + + switch (animation) { + case 'fade': + this.isWindowOpenFade.set(true); + break; + case 'slide': + this.isWindowOpenSlide.set(true); + break; + case 'slide-up': + this.isWindowOpenSlideUp.set(true); + break; + case 'slide-down': + this.isWindowOpenSlideDown.set(true); + break; + case 'scale': + this.isWindowOpenScale.set(true); + break; + } } openModal(): void {