diff --git a/components/lib/badgedirective/BadgeDirective.d.ts b/components/lib/badgedirective/BadgeDirective.d.ts index b86c7baee..96d2296b0 100644 --- a/components/lib/badgedirective/BadgeDirective.d.ts +++ b/components/lib/badgedirective/BadgeDirective.d.ts @@ -68,16 +68,27 @@ export interface BadgeContext { info: boolean; /** * Current success state as a boolean. + * @defaultValue false */ success: boolean; /** * Current warning state as a boolean. + * @defaultValue false */ warning: boolean; /** * Current danger state as a boolean. + * @defaultValue false */ danger: boolean; + /** + * Current gutter state as a boolean. + */ + nogutter: boolean; + /** + * Current dot state as a boolean. + */ + dot: boolean; } /** diff --git a/components/lib/badgedirective/BadgeDirective.js b/components/lib/badgedirective/BadgeDirective.js index c30a4d454..b032fb191 100644 --- a/components/lib/badgedirective/BadgeDirective.js +++ b/components/lib/badgedirective/BadgeDirective.js @@ -11,7 +11,11 @@ const BadgeDirective = BaseBadgeDirective.extend('badge', { id, class: !el.unstyled && this.cx('root'), 'p-bind': this.ptm('root', { - context: binding.modifiers + context: { + ...binding.modifiers, + nogutter: String(binding.value).length === 1, + dot: binding.value == null + } }) });