// 引入 angular 动画组件
import {trigger, style, state, transition, animate} from '@angular/animations';

export const toggle = trigger('toggle', [
    state('off', style({
        'background-color': 'rgba(128, 128, 128, 0.7)'
    })),
    state('on', style({
        'background-color': '#1890ff'
    })),
    transition('off => on', animate('100ms')),
    transition('on => off', animate('100ms'))
]);
