coreui-angular-ex-dev
Version:
CoreUI Components Library for Angular
22 lines (19 loc) • 546 B
text/typescript
import { Directive, HostBinding, Input } from '@angular/core';
({
selector: '[cCardImg]',
standalone: true
})
export class CardImgDirective {
/**
* Optionally orientate the image to the top, bottom, or make it overlaid across the card.
* @type {'top | 'bottom'}
*/
('cCardImg') orientation?: 'top' | 'bottom';
('class')
get hostClasses(): any {
const suffix = !!this.orientation ? `-${this.orientation}` : '';
return {
[`card-img${suffix}`]: true
};
}
}