unicorn-components
Version:
<a target="_blank" href="https://getunicorn.io"><img src="https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2017/Jul/07/2615006260-5-nitsnetsstudios-ondemand-UNI_avatar.png" align="left"></a>
27 lines (22 loc) • 759 B
text/typescript
import { Component, HostBinding, Input, OnChanges } from '@angular/core';
export class UniAsideComponent implements OnChanges {
componentClass = true;
left = false;
right = false;
position: 'left' | 'right' = 'left';
ngOnChanges(changes) {
if (this.position === 'left') {
this.left = true;
this.right = false;
} else if (this.position === 'right') {
this.left = false;
this.right = true;
}
}
constructor() { }
}