Closed Unarray closed 1 year ago
Hi @Unarray,
This seems interesting, I thought that the id
would be enough for customizing the component, but the class could be helpful too.
Could you open a PR with the suggested code?
Yes, I can open a PR (I'll do it in one or two hours). The advantage of classes is that you can have the same style without duplicating it several times unlike IDs. Let's say we want a 5px margin on each of our particles. So we have to duplicate as many times as we have particles unlike classes.
I never recommend to have more than one particles instance per page, the performance could drop very fast. But more particles can be shown in different pages and they could have the same format, it makes sense to have a class.
Currently, we cannot pass classes to the
Particle
component which makes for example the positioning of our particle container difficult.To solve this problem, I suggest this changes:
Final code
```htmlNow we can do :