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

feat(ui): size customization #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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
src/index.js Outdated Show resolved Hide resolved
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.

None yet

2 participants