Skip to content

Conversation

@danielvportlandia
Copy link

@danielvportlandia danielvportlandia commented May 6, 2021

Description

Adds the size prop to allow for customization of the confetti's height/width ratios. The default value is to offset the latest changes to have the confettis closer resemble what is displayed in the demo.

Result

Further customization options available and restores confettis visually to < 1.5.2 versions.

Before (current v.1.5.2 code)

After

@danielvportlandia danielvportlandia marked this pull request as ready for review May 6, 2021 03:20
Comment on lines +34 to +35
const height = randomValue(size * 0.5, size);
const width = randomValue(size * 0.4, size * 0.75);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these values will be set at every render and not only on mount.
could you please use useEffect() to set it please ?

comment: we could do this for isRounded too btw

@VincentCATILLON
Copy link
Owner

Hi @danielvportlandia

Thanks a lot for your nice contribution, can you apply the suggestions to be able to merge it ? :)

@VincentCATILLON VincentCATILLON changed the title adds “size” prop for customization feat(ui): size customization Sep 30, 2022
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.

2 participants