Browse Source

feature(theme-shared): add collapse animations

pull/1760/head
mehmet-erim 7 years ago
parent
commit
a7b2b00c5d
  1. 1
      npm/ng-packs/packages/core/src/lib/directives/index.ts
  2. 19
      npm/ng-packs/packages/theme-shared/src/lib/animations/collapse.animations.ts
  3. 1
      npm/ng-packs/packages/theme-shared/src/lib/animations/index.ts

1
npm/ng-packs/packages/core/src/lib/directives/index.ts

@ -1,4 +1,5 @@
export * from './autofocus.directive';
export * from './collapse.directive';
export * from './ellipsis.directive';
export * from './for.directive';
export * from './form-submit.directive';

19
npm/ng-packs/packages/theme-shared/src/lib/animations/collapse.animations.ts

@ -0,0 +1,19 @@
import { trigger, state, style, transition, animate } from '@angular/animations';
export const collapse = trigger('collapse', [
state(
'open',
style({
height: '*',
overflow: 'hidden',
}),
),
state(
'close',
style({
height: '0px',
overflow: 'hidden',
}),
),
transition('open <=> close', animate(350)),
]);

1
npm/ng-packs/packages/theme-shared/src/lib/animations/index.ts

@ -1,2 +1,3 @@
export * from './collapse.animations';
export * from './fade.animations';
export * from './slide.animations';

Loading…
Cancel
Save