From be0fcd3ca7187d2fbf66fcfc155166f42b637d3c Mon Sep 17 00:00:00 2001 From: Anthony Nahas Date: Mon, 25 Mar 2019 19:32:55 +0100 Subject: [PATCH] feat(package): make the toggle optional (input - isVisible) #153 --- .../mat-pass-toggle-visibility.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/module/component/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.ts b/src/module/component/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.ts index e3b22568..763e8e9c 100644 --- a/src/module/component/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.ts +++ b/src/module/component/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from '@angular/core'; +import {Component, Input, ViewEncapsulation} from '@angular/core'; type Type = 'text' | 'password' ; @@ -10,7 +10,9 @@ type Type = 'text' | 'password' ; }) export class MatPassToggleVisibilityComponent { + @Input() isVisible: boolean; + _type: Type = 'text'; get type() {