2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 import { Component, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
22 //import { trigger, state, style, transition, animate, keyframes } from '@angular/animations';
26 templateUrl: './checkbox.component.html',
27 styleUrls: ['./checkbox.component.less'],
28 encapsulation: ViewEncapsulation.None
30 // trigger('checkEffect', [
31 // state('true', style({ position: 'absolute', left: '2px', top: '5px', width: '10px', height: '10px', display: 'none', opacity: '.5' })),
32 // state('false', style({ left: '-18px', top: '-15px', height: '50px', width: '50px', opacity: '0' })),
33 // transition('1 => 0', animate('150ms ease-out')),
34 // transition('0 => 1', animate('150ms ease-in'))
38 export class CheckboxComponent {
40 @Input() checkboxStyle: string;
41 @Input() label: string;
42 @Input() checked: boolean;
43 @Input() disabled: boolean;
44 @Output() checkedChange: EventEmitter<any> = new EventEmitter<any>();
46 toggleState(newValue:boolean) {
47 this.checkedChange.emit(newValue);