Closed nook24 closed 5 months ago
@nook24
@coreui/angular
?quick and dirty workarounds:
btn-xs
class directly, or@ts-ignore
I am using @coreui/angular 5.0.1
and also came up with the ts-ignore variant like so
export class XsButtonDirective extends ButtonDirective {
// Override the size property defined in the original ButtonDirective
// @ts-ignore
@Input() override size?: 'xs' | 'sm' | 'lg' | '';
constructor() {
super();
}
}
I guess that's fine for me :)
@nook24 thanks for the follow up! We are considering implementing generics to enable users to employ custom types in these situations.
Hi, I have a
.btn-xs
css class and trying to add this to thesize
property. Unfortunately I don't know how I can overwrite the original type definition, without copy&paste the whole file.https://github.com/coreui/coreui-angular/blob/e2b99d79b1675bf276322399af0d07a78665303f/projects/coreui-angular/src/lib/button/button.directive.ts#L35-L39
I tried it like so
But this errors out with