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

export const toggleIn = trigger('toggleIn', [
    state('off', style({
        'transform': 'translateX(0)'
    })),
    state('on', style({
        'transform': 'translateX(35px)'
    })),
    transition('off => on', animate('300ms')),
    transition('on => off', animate('300ms'))
]);
