Skip to content

Add desc to component type#120

Merged
pd4d10 merged 2 commits into
pd4d10:mainfrom
annadrg:main
Nov 1, 2024
Merged

Add desc to component type#120
pd4d10 merged 2 commits into
pd4d10:mainfrom
annadrg:main

Conversation

@annadrg

@annadrg annadrg commented Jun 7, 2024

Copy link
Copy Markdown
Contributor

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

Closes #116

Comment thread client.d.ts

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

Copy link
Copy Markdown
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
Copy Markdown
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");

@annadrg annadrg Aug 20, 2024

Copy link
Copy Markdown
Contributor Author

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

pd4d10 commented Nov 1, 2024

Copy link
Copy Markdown
Owner

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