Added sliding effect to the items

This commit is contained in:
NejcZdovc
2016-10-17 14:35:29 +02:00
committed by József Farkas
parent 51c33cec3c
commit 721e676eb8
7 changed files with 82 additions and 19 deletions

View File

@@ -1,4 +1,14 @@
import { Component, OnDestroy, QueryList, ViewChildren } from '@angular/core';
import {
Component,
OnDestroy,
QueryList,
ViewChildren,
animate,
state,
style,
transition,
trigger
} from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import '@ngrx/core/add/operator/select';
@@ -18,6 +28,17 @@ import { MacroActions } from '../../store/actions';
import { getMacro } from '../../store/reducers/macro';
@Component({
animations: [
trigger('toggler', [
state('inactive', style({
height: '0px'
})),
state('active', style({
height: '*'
})),
transition('inactive <=> active', animate('500ms ease-out'))
])
],
selector: 'macro',
template: require('./macro.component.html'),
styles: [require('./macro.component.scss')],