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
Changes from all commits
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
2 changes: 1 addition & 1 deletion client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.

>;

export default ReactComponent;
Expand Down