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

feat: Support viewing SVG if import as ReactComponent #195

Merged
merged 5 commits into from
Jul 19, 2022

Conversation

ntt261298
Copy link
Collaborator

@ntt261298 ntt261298 commented Jul 10, 2022

Summary/ Motivation (TLDR;)

  • Support import SVG as a component (ReactComponent)

Related issues

Features

  • Display SVG if user import it as a component
    import { ReactComponent as Logo } from './logo.svg';

Chores

  • Add playground folder to contains snippets, which help us validate our idea faster.

@netlify
Copy link

netlify bot commented Jul 10, 2022

Deploy Preview for jest-preview-library canceled.

Name Link
🔨 Latest commit 5625a85
🔍 Latest deploy log https://app.netlify.com/sites/jest-preview-library/deploys/62d1ab3555d76500097e6c88

@nvh95 nvh95 linked an issue Jul 15, 2022 that may be closed by this pull request
@nvh95 nvh95 force-pushed the support-svg-component branch from 7692d93 to 5f706f7 Compare July 15, 2022 17:50
@nvh95 nvh95 force-pushed the support-svg-component branch from 3b6267f to 5625a85 Compare July 15, 2022 18:00
@nvh95
Copy link
Owner

nvh95 commented Jul 15, 2022

@ntt261298 I can make it work for now. I haven't tested much but at least we know that it's feasible.
image

As in the above image. The Vite logo is where we import it as ReactComponent.

@nvh95 nvh95 changed the title feat: WIP code for svg component feat: Support viewing SVG if import as ReactComponent Jul 15, 2022
@nvh95 nvh95 marked this pull request as ready for review July 19, 2022 14:46
@nvh95 nvh95 merged commit 4fcba78 into main Jul 19, 2022
@nvh95 nvh95 deleted the support-svg-component branch July 19, 2022 14:48
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.

Support import SVG as a component (ReactComponent)
2 participants