Skip to content

Conversation

@ValentinH
Copy link
Contributor

@ValentinH ValentinH commented Apr 5, 2019

This is a follow-up of #1667.

animated-fork

The effect is simple because for now I didn't want to modify the markup of the button.

With my limited CSS skills, I think @CompuIves suggestion regarding nzbin.github.io/three-dots would require to have a div wrapper around the button and a div to display the 3 dots. Do we want to do this?

@ValentinH
Copy link
Contributor Author

ValentinH commented Apr 7, 2019

I'll provide another solution by creating a <ProgressButton> component that would wrap the Button itself. It will keep the same API (and pass most props to the Button itself) and support a loading prop (maybe also a success one).
Like this we are not limited and can be creative. Also we are not bloating the default Button component.

This is a follow-up of codesandbox#1667.
The effect is simple because for now I didn't want to modify the markup of the button.

As far as my limited CSS skills lead me, @CompuIves suggestion regarding nzbin.github.io/three-dots would require to have a div wrapper around the button and a div to display the 3 dots. Do we want to do this?
@ValentinH ValentinH force-pushed the forking-button-progress branch from 8da2075 to 5e5920f Compare April 7, 2019 19:59
@ValentinH ValentinH force-pushed the forking-button-progress branch from 1cc2a33 to f01daac Compare April 7, 2019 21:04
@ValentinH
Copy link
Contributor Author

I have updated the PR to have a better loader. It introduces a <ProgressButton> that wrap the button and add a loader on top of it.

fork-loading

@CompuIves
Copy link
Member

I like that! Could you make the dots a bit smaller? That would make the effect a bit more subtle.

@ValentinH
Copy link
Contributor Author

Do you like this better? I also made it a bit less transparent.

6px was feeling too small to me.

loading-button

@CompuIves
Copy link
Member

Yes, great! Thanks a lot!

@CompuIves
Copy link
Member

This implementation is super clean, I love it!

@CompuIves CompuIves merged commit 33f19af into codesandbox:master Apr 16, 2019
@ValentinH ValentinH deleted the forking-button-progress branch April 16, 2019 14:56
@ValentinH
Copy link
Contributor Author

I'd love to continue contributing to codesandbox, maybe on something bigger. Do you have a good issue for me?

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