Skip to content

Commit

Permalink
fix(tag): fix the type error for the hover prop of the tag component (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
masoudmanson authored Feb 14, 2023
1 parent f9844d3 commit b9a3662
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions src/core/Tag/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Tag
color={color}
icon={icon}
label={label}
sdsStyle={sdsStyle}
sdsType={sdsType}
{...props}
/>
);
return <Tag label={label} {...props} />;
};

const customColorTuples = {
Expand Down
2 changes: 1 addition & 1 deletion src/core/Tag/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit b9a3662

Please sign in to comment.