coreui-angular-ex
Version:
CoreUI Components Library for Angular
34 lines (28 loc) • 794 B
text/typescript
import { Component, HostBinding, Input } from '@angular/core';
import { Colors, TextColors } from '../coreui.types';
({
selector: 'c-card, [c-card]',
template: `<ng-content></ng-content>`,
standalone: true
})
export class CardComponent {
/**
* Sets the color context of the component to one of CoreUI’s themed colors.
* @type Colors
*/
() color?: Colors;
/**
* Sets the text color context of the component to one of CoreUI’s themed colors.
* @type TextColors
*/
() textColor?: TextColors;
('class')
get hostClasses(): any {
return {
card: true,
[`bg-${this.color}`]: !!this.color,
[`text-${this.textColor}`]: !!this.textColor,
};
}
constructor() { }
}