1
1
import { CommonModule } from '@angular/common' ;
2
- import { AfterViewInit , booleanAttribute , ChangeDetectionStrategy , Component , computed , Directive , inject , Input , input , NgModule , OnChanges , SimpleChanges , ViewEncapsulation } from '@angular/core' ;
2
+ import {
3
+ AfterViewInit ,
4
+ booleanAttribute ,
5
+ ChangeDetectionStrategy ,
6
+ Component ,
7
+ computed ,
8
+ Directive ,
9
+ inject ,
10
+ Input ,
11
+ input ,
12
+ NgModule ,
13
+ OnChanges ,
14
+ SimpleChanges ,
15
+ ViewEncapsulation
16
+ } from '@angular/core' ;
3
17
import { addClass , hasClass , isEmpty , isNotEmpty , removeClass , uuid } from '@primeuix/utils' ;
4
18
import { SharedModule } from 'primeng/api' ;
5
19
import { BaseComponent } from 'primeng/basecomponent' ;
@@ -25,6 +39,7 @@ export class BadgeDirective extends BaseComponent implements OnChanges, AfterVie
25
39
* @group Props
26
40
*/
27
41
@Input ( ) public badgeSize : 'large' | 'xlarge' | 'small' | null | undefined ;
42
+
28
43
/**
29
44
* Size of the badge, valid options are "large" and "xlarge".
30
45
* @group Props
@@ -34,9 +49,11 @@ export class BadgeDirective extends BaseComponent implements OnChanges, AfterVie
34
49
this . _size = value ;
35
50
console . log ( 'size property is deprecated and will removed in v18, use badgeSize instead.' ) ;
36
51
}
52
+
37
53
get size ( ) {
38
54
return this . _size ;
39
55
}
56
+
40
57
_size : 'large' | 'xlarge' | 'small' | null | undefined ;
41
58
/**
42
59
* Severity type of the badge.
@@ -235,6 +252,7 @@ export class BadgeDirective extends BaseComponent implements OnChanges, AfterVie
235
252
}
236
253
}
237
254
}
255
+
238
256
/**
239
257
* Badge is a small status indicator for another element.
240
258
* @group Components
@@ -278,7 +296,7 @@ export class Badge extends BaseComponent {
278
296
* Severity type of the badge.
279
297
* @group Props
280
298
*/
281
- severity = input < 'secondary' | 'info' | 'success' | 'warn' | 'danger' | 'contrast' | null > ( ) ;
299
+ severity = input < 'secondary' | 'info' | 'success' | 'warn' | 'danger' | 'contrast' | 'primary' | 'help' | null > ( ) ;
282
300
/**
283
301
* Value to display inside the badge.
284
302
* @group Props
0 commit comments