1 import { Component, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
2 //import { trigger, state, style, transition, animate, keyframes } from '@angular/core';
6 templateUrl: './checkbox.component.html',
7 styleUrls: ['./checkbox.component.less'],
8 encapsulation: ViewEncapsulation.None
10 // trigger('checkEffect', [
11 // state('true', style({ position: 'absolute', left: '2px', top: '5px', width: '10px', height: '10px', display: 'none', opacity: '.5' })),
12 // state('false', style({ left: '-18px', top: '-15px', height: '50px', width: '50px', opacity: '0' })),
13 // transition('1 => 0', animate('150ms ease-out')),
14 // transition('0 => 1', animate('150ms ease-in'))
18 export class CheckboxComponent {
20 @Input() checkboxStyle: string;
21 @Input() label: string;
22 @Input() checked: boolean;
23 @Input() disabled: boolean;
24 @Output() checkedChange: EventEmitter<any> = new EventEmitter<any>();
26 toggleState(newValue:boolean) {
27 this.checkedChange.emit(newValue);