|
|
import { Component, Input, Output, EventEmitter, ContentChild, TemplateRef } from '@angular/core'; |
|
|
import { CommonModule } from '@angular/common'; |
|
|
|
|
|
@Component({ |
|
|
selector: 'app-auth-card', |
|
|
standalone: true, |
|
|
imports: [CommonModule], |
|
|
templateUrl: './auth-card.component.html', |
|
|
styleUrls: ['./auth-card.component.css'] |
|
|
}) |
|
|
export class AuthCardComponent { |
|
|
@Input() isFlipped = false; |
|
|
@Output() flip = new EventEmitter<boolean>(); |
|
|
|
|
|
|
|
|
@ContentChild('signInTemplate', { read: TemplateRef }) signInTemplate: TemplateRef<any> | null = null; |
|
|
@ContentChild('signUpTemplate', { read: TemplateRef }) signUpTemplate: TemplateRef<any> | null = null; |
|
|
|
|
|
toggleFlip() { |
|
|
this.isFlipped = !this.isFlipped; |
|
|
this.flip.emit(this.isFlipped); |
|
|
} |
|
|
} |
|
|
|