Skip to content

fix(Tag) No more accidentally passing active as html prop #7069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(Tag) No more accidentally passing active as html prop
  • Loading branch information
jscheiny committed Nov 14, 2024
commit f75e47c952c8609139a3284356586512f81cb429
1 change: 1 addition & 0 deletions packages/core/src/components/tag/tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export interface TagProps
*/
export const Tag: React.FC<TagProps> = React.forwardRef((props, ref) => {
const {
active: _active,
Copy link
Contributor

@ggdouglas ggdouglas Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would wrapping htmlProps in removeNonHTMLProps achieve the same result?

{...removeNonHTMLProps(htmlProps)}

const INVALID_PROPS = [
"active",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, will do that too to be safe

children,
className,
fill,
Expand Down