From 9895bbacaf92b257cb843a7feba1b3502842245d Mon Sep 17 00:00:00 2001 From: luciob Date: Fri, 15 Jul 2022 15:03:21 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20[Adornment]=20Added=20ba?= =?UTF-8?q?dge=20overlap,=20defaults=20to=20circular?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Adornment/components/Badge/index.tsx | 4 ++-- src/types/Adornment.ts | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/Adornment/components/Badge/index.tsx b/src/components/Adornment/components/Badge/index.tsx index 5eeac171..710ca754 100644 --- a/src/components/Adornment/components/Badge/index.tsx +++ b/src/components/Adornment/components/Badge/index.tsx @@ -19,10 +19,10 @@ const AdornmentBadge: FC = ({ badge, children, dataCy = DEFAULT_DATA return {children}; } - const { color = "default", value, variant = "standard" } = badge; + const { color = "default", overlap = "circular", value, variant = "standard" } = badge; return ( - + {children} ); diff --git a/src/types/Adornment.ts b/src/types/Adornment.ts index d7366d1f..7e50ae69 100644 --- a/src/types/Adornment.ts +++ b/src/types/Adornment.ts @@ -8,11 +8,26 @@ export type IAdornmentSubpart = "adornment" | IAdornmentBadgeSubpart | IAdornmen type IBadgeColor = "default" | "error" | "primary" | "secondary"; +type IBadgeOverlap = "circular" | "rectangular"; + type IBadgeVariant = "dot" | "standard"; export interface IAdornmentBadge { + /** + * Badge color + */ color?: IBadgeColor; + /** + * Badge overlap + */ + overlap?: IBadgeOverlap; + /** + * Badge content + */ value: string; + /** + * Badge variant + */ variant?: IBadgeVariant; }