[ADF-3512] SidenavLayoutComponent option to show the sidebar on the right (#3768)

* add sidebar end start property

* add demo and test

* fix test

* fix failing test
This commit is contained in:
Eugenio Romano
2018-09-12 10:02:24 +01:00
committed by GitHub
parent 3d5da1e622
commit cc396e2a11
16 changed files with 186 additions and 79 deletions

View File

@@ -23,8 +23,14 @@ export const sidenavAnimation: AnimationTriggerMetadata = trigger('sidenavAnimat
transition('compact <=> expanded', animate('0.4s cubic-bezier(0.25, 0.8, 0.25, 1)'))
]);
export const contentAnimation: AnimationTriggerMetadata = trigger('contentAnimation', [
state('expanded', style({ 'margin-left': '{{ marginLeft }}px' }), { params : { marginLeft: 0 } }),
state('compact', style({'margin-left': '{{ marginLeft }}px' }), { params : { marginLeft: 0 } }),
export const contentAnimationLeft: AnimationTriggerMetadata = trigger('contentAnimationLeft', [
state('expanded', style({ 'margin-left': '{{ margin }}px' }), { params : { margin: 0 } }),
state('compact', style({'margin-left': '{{ margin }}px' }), { params : { margin: 0 } }),
transition('expanded <=> compact', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)'))
]);
export const contentAnimationRight: AnimationTriggerMetadata = trigger('contentAnimationRight', [
state('expanded', style({ 'margin-right': '{{ margin }}px' }), { params : { margin: 0 } }),
state('compact', style({'margin-right': '{{ margin }}px' }), { params : { margin: 0 } }),
transition('expanded <=> compact', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)'))
]);