wufe / react-particles-js

Particles.js for React
https://rpj.bembi.dev/
MIT License
1.15k stars 106 forks source link

TypescriptBug. IParticlesParams Type has an error. #101

Closed koniuszy closed 4 years ago

koniuszy commented 4 years ago

mode: ['grab', 'repulse'], can be an array not only a single string

sample:

import Particles, { IParticlesParams } from 'react-particles-js'

const ParticleSett = {
...
interactivity: {
        detect_on: 'canvas',
        events: {
            onhover: {
                enable: true,
                mode: ['grab', 'repulse']
            },
...
}

<Background params={ParticleSett} />
wufe commented 4 years ago

Thanks for the feedback. v2.7.1 should fix the issue