From 26433c3f127dce9c72c8002a0564421fc84ccd75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 7 Mar 2023 10:32:19 +0300 Subject: [PATCH] Fixed #3649 - Badge: do not render Zero correctly --- api-generator/components/badge.js | 2 +- components/badge/Badge.d.ts | 6 +++--- components/badge/Badge.vue | 21 ++++++++++++++++----- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/api-generator/components/badge.js b/api-generator/components/badge.js index b37b5b352..5c7245dfb 100644 --- a/api-generator/components/badge.js +++ b/api-generator/components/badge.js @@ -1,7 +1,7 @@ const BadgeProps = [ { name: 'value', - type: 'any', + type: 'string | number', default: 'null', description: 'Value to display inside the badge.' }, diff --git a/components/badge/Badge.d.ts b/components/badge/Badge.d.ts index 5ed4a4bd4..b7a06b0c5 100644 --- a/components/badge/Badge.d.ts +++ b/components/badge/Badge.d.ts @@ -17,15 +17,15 @@ export interface BadgeProps { /** * Value to display inside the badge. */ - value?: any; + value?: string | number; /** * Severity type of the badge. */ - severity?: 'info' | 'success' | 'warning' | 'danger' | undefined; + severity?: 'info' | 'success' | 'warning' | 'danger' | null | undefined; /** * Size of the badge, valid options are 'large' and 'xlarge'. */ - size?: 'large' | 'xlarge' | undefined; + size?: 'large' | 'xlarge' | null | undefined; } /** diff --git a/components/badge/Badge.vue b/components/badge/Badge.vue index 05a905b19..4d0ab5c76 100644 --- a/components/badge/Badge.vue +++ b/components/badge/Badge.vue @@ -5,12 +5,23 @@