Jump to content
Search Community

how do I use drawsvgplugins in codesandbox with react?

blumaa@gmail.com test
Moderator Tag

Recommended Posts

I knew you had answered it but I went back and tried it with DrawSVG and it's not working in codesandbox.. Am I doing something wrong?

 

I put this in my  codesandbox linked above in the html body:     <script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/DrawSVGPlugin3.min.js"></script>

Link to comment
Share on other sites

You can't import from a script tag. Just register the plugin. 

https://codesandbox.io/s/x-ion-gmbh-logo-po9q2?file=/src/Logo.js

 

You should probably read up on the migration guide. You're using lots of deprecated syntax.

 

Duration goes inside the vars object now. Stagger is a property. And eases are just strings. No need to import them.

tl.to(
  streak,
  {
    duration: 0.01,
    opacity: 0,
    ease: "back",
    stagger: -0.02
  }
);

 

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...