From b9a36626a821ee5f2e12295665d3f5035f9f521e Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Tue, 14 Feb 2023 12:48:54 -0500 Subject: [PATCH] fix(tag): fix the type error for the hover prop of the tag component (#353) --- src/core/Tag/index.stories.tsx | 13 ++----------- src/core/Tag/style.ts | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/core/Tag/index.stories.tsx b/src/core/Tag/index.stories.tsx index f906b99a1..d978f2386 100644 --- a/src/core/Tag/index.stories.tsx +++ b/src/core/Tag/index.stories.tsx @@ -5,18 +5,9 @@ import Icon from "../Icon"; import Tag from "./index"; const Demo = (props: Args): JSX.Element => { - const { color, icon, label, sdsStyle, sdsType } = props; + const { label } = props; - return ( - - ); + return ; }; const customColorTuples = { diff --git a/src/core/Tag/style.ts b/src/core/Tag/style.ts index adddfbd21..5e3749d58 100644 --- a/src/core/Tag/style.ts +++ b/src/core/Tag/style.ts @@ -231,7 +231,7 @@ const typeToCss = { secondary, }; -const doNotForwardProps = ["sdsType", "sdsStyle", "tagColor"]; +const doNotForwardProps = ["sdsType", "sdsStyle", "tagColor", "hover"]; export const StyledTag = styled(Chip, { shouldForwardProp: (prop) => !doNotForwardProps.includes(prop as string),