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

Can't get icons to render in Storybook #175

Open
andersravn opened this issue Sep 14, 2021 · 4 comments
Open

Can't get icons to render in Storybook #175

andersravn opened this issue Sep 14, 2021 · 4 comments

Comments

@andersravn
Copy link

Hi there.

I'm trying to get svgicon to render icons in Storybook (using Vite). It renders the svg tag, but not the paths inside of it. I have tried to make a simple repo that outlines the problem here: https://github.com/andersravn/storybook-vue-icons. Use npm run storybook. There's a Button story with the label "Button with an icon:", where the icon is supposed to show after the colon.

I'm not seeing any errors.

What am I missing?

Thanks in advance.

@Allenice
Copy link
Contributor

Allenice commented Oct 8, 2021

Did you register vue-svgicon plugin?

https://github.com/MMF-FE/svgicon/tree/master/packages/vite-plugin-svgicon#setup

// main.ts
import { createApp } from 'vue'
import App from './App'
import { VueSvgIconPlugin } from '@yzfe/vue3-svgicon'
import '@yzfe/svgicon/lib/svgicon.css'


createApp(App)
    .use(VueSvgIconPlugin, {
        tagName: 'icon'
    })
    .mount('#app')

@andersravn
Copy link
Author

@bajzarpa
Copy link

@andersravn have you figured it out? I've just encountered the same problem

@fcojalvarez
Copy link

Same problem here.. any solution?

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

No branches or pull requests

4 participants