Skip to content
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

Add desc to component type #120

Merged
merged 2 commits into from
Nov 1, 2024
Merged

Add desc to component type #120

merged 2 commits into from
Nov 1, 2024

Conversation

annadrg
Copy link
Contributor

@annadrg annadrg commented Jun 7, 2024

Adds the desc prop (gregberge/svgr#729) to the component type.

Closes #116

@@ -5,7 +5,7 @@ declare module "*.svg?react" {
import * as React from "react";

const ReactComponent: React.FunctionComponent<
React.ComponentProps<"svg"> & { title?: string }
React.ComponentProps<"svg"> & { title?: string, titleId?: string, desc?: string, descId?: string }
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks for your contribution!

It's only for type. Should the implementation be updated to make it work?

Copy link
Owner

Choose a reason for hiding this comment

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

Currently only jsx plugin is used. Not quite sure if other plugins should be applied to support this feature

const { default: jsx } = await import("@svgr/plugin-jsx");

Copy link
Contributor Author

@annadrg annadrg Aug 20, 2024

Choose a reason for hiding this comment

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

@pd4d10 I'm not sure what you mean. The feature already works, I think the typescript error is the only problem.

@annadrg annadrg requested a review from pd4d10 October 24, 2024 11:13
@pd4d10 pd4d10 merged commit 4d515a3 into pd4d10:main Nov 1, 2024
@pd4d10
Copy link
Owner

pd4d10 commented Nov 1, 2024

Sorry for the late response. Thank you!

Published v4.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client types missing desc?
2 participants