diff --git a/sharedComponents/quick-contact/quick-contact.component.css b/sharedComponents/quick-contact/quick-contact.component.css new file mode 100644 index 00000000..25a56178 --- /dev/null +++ b/sharedComponents/quick-contact/quick-contact.component.css @@ -0,0 +1,21 @@ +.quick-contact { + position: fixed; + bottom: 40px; + right: 40px; +} +.quick-contact-modal { + position: absolute; + bottom: 80px; + right: 0; + width: 375px; +} + +@media (max-width: 768px) { + .quick-contact { + bottom: 20px; + right: 20px; + } + .quick-contact-modal { + width: 300px; + } +} \ No newline at end of file diff --git a/sharedComponents/quick-contact/quick-contact.component.html b/sharedComponents/quick-contact/quick-contact.component.html new file mode 100644 index 00000000..186f04d8 --- /dev/null +++ b/sharedComponents/quick-contact/quick-contact.component.html @@ -0,0 +1,14 @@ +
+ + + + HELP + +
+
+ Send a message
+ How can we help?
+ We usually respond in a few hours +
+
+
\ No newline at end of file diff --git a/sharedComponents/quick-contact/quick-contact.component.ts b/sharedComponents/quick-contact/quick-contact.component.ts new file mode 100644 index 00000000..03a4aa06 --- /dev/null +++ b/sharedComponents/quick-contact/quick-contact.component.ts @@ -0,0 +1,14 @@ +import {Component, Input, OnDestroy, OnInit} from '@angular/core'; + +@Component({ + selector: 'quick-contact', + templateUrl: 'quick-contact.component.html', + styleUrls: ['quick-contact.component.css'] +}) +export class QuickContactComponent { + public showModal: boolean = false; + + public toggleModal() { + this.showModal = !this.showModal; + } +} \ No newline at end of file diff --git a/sharedComponents/quick-contact/quick-contact.module.ts b/sharedComponents/quick-contact/quick-contact.module.ts new file mode 100644 index 00000000..0f75c7e5 --- /dev/null +++ b/sharedComponents/quick-contact/quick-contact.module.ts @@ -0,0 +1,27 @@ +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; + +import {QuickContactComponent} from './quick-contact.component'; +import {IconsModule} from '../../utils/icons/icons.module'; +import {IconsService} from '../../utils/icons/icons.service'; +import {mail} from '../../utils/icons/icons'; +import {close} from '../../utils/icons/icons'; + +@NgModule({ + imports: [ + CommonModule, FormsModule, IconsModule + ], + declarations: [ + QuickContactComponent + ], + providers:[], + exports: [ + QuickContactComponent + ] +}) +export class QuickContactModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([mail,close]) + } +} diff --git a/sharedComponents/quick-contact/quick-contact.service.ts b/sharedComponents/quick-contact/quick-contact.service.ts new file mode 100644 index 00000000..0ddcdcc7 --- /dev/null +++ b/sharedComponents/quick-contact/quick-contact.service.ts @@ -0,0 +1,17 @@ +import { Injectable } from "@angular/core"; +import { BehaviorSubject, Observable } from "rxjs"; + +@Injectable({ + providedIn: "root" +}) +export class QuickContactService { + private display: BehaviorSubject = new BehaviorSubject(true); + + public get isDisplayed(): Observable { + return this.display.asObservable(); + } + + public setDisplay(display: boolean) { + this.display.next(display); + } +} \ No newline at end of file