minutemailer / react-popup

React popup component
http://minutemailer.github.io/react-popup/
MIT License
208 stars 71 forks source link

add footer #32

Open z-vr opened 7 years ago

z-vr commented 7 years ago

This PR adds a footer. Could be useful to put something like loading indicator.

tbleckert commented 6 years ago

I'm sorry, I've totally missed this one. I like it, good feature, can be really useful. Is it possible for me to contribute to your PR (have never done it before)? Or do you have time to make it compatible with the latest updates/code changes?

Either way, thanks!

z-vr commented 6 years ago

@tbleckert hey I've updated the PR -- you'll have to rebuild the dist though!

tbleckert commented 6 years ago

Awesome, thanks!

tbleckert commented 6 years ago

What do you think about making the footer a separate layer below the buttons? Something like this

Title
Body
Buttons Buttons
Footer

Just an idea I got and wanted to hear your opinion about it.

z-vr commented 6 years ago

@tbleckert hey, the way we use it is to place a loading indicator in there, e.g., jan-11-2018 13-04-39 I feel like if there appears an extra area below the button, it would make the form jump if you get what i mean? It's probably possible to configure this kind of footer as you mentioned because it does look cool on the image above.

tbleckert commented 6 years ago

Ah ok I see. What do you think about having the buttons arrays accepting components as well (not only button objects)?

{
    left: [<LoadingIndicator />],
    right: [{
        text: 'Add',
    }]
}

That way you also get more freedom when it comes to adding buttons.

And then skip the footer idea I had or have it as a second new feature.

tbleckert commented 6 years ago

@z-vr Would this suit your needs? https://github.com/minutemailer/react-popup/blob/master/example/index.jsx#L19-L29