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

Generate React component for each icon #90

Merged
merged 6 commits into from
Jul 12, 2024
Merged

Generate React component for each icon #90

merged 6 commits into from
Jul 12, 2024

Conversation

sandhose
Copy link
Member

This is on top of #89

This generates a proper React component for each icon.
This means that downstream packages can consume them directly without having to setup svgr locally.

The reason we want to do this is:

  1. this means icons can be deduplicated across packages
  2. we generate nice typescript types for each icon
  3. we have a nice index which exports all the icons
  4. less setup in downstream packages

Copy link
Member

@robintown robintown left a comment

Choose a reason for hiding this comment

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

Tested and working in EW. I don't think we have anyone depending on the old assets/web/icons/*.svg files that were deleted, but let's still count this as a breaking change.

Comment on lines 21 to 27
declare module "prettier" {
export interface Options {}
}

declare module "svgo" {
export interface Config {}
}
Copy link
Member

Choose a reason for hiding this comment

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

This could do with a comment like that in global.d.ts

Copy link
Member Author

Choose a reason for hiding this comment

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

Han, that's a leftover, I first tried there before moving things to global.d.ts

Copy link
Member Author

Choose a reason for hiding this comment

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

Rebased and removed that

@sandhose sandhose changed the base branch from quenting/esm-cleanup to main July 12, 2024 06:21
@sandhose sandhose merged commit b560cc6 into main Jul 12, 2024
3 checks passed
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.

2 participants