nypr-react-mailchimp-subscribe
v1.0.2
Published
react-mailchimp-subscribe React component
Downloads
5
Keywords
Readme
react-mailchimp-subscribe
React Ajax subscribe form for Mailchimp.
Working demo : https://codesandbox.io/s/5wyqr6npw4
Usage
Create a list on mailchimp, add a form and get its "action" attribute
import SubscribeFrom from 'react-mailchimp-subscribe'
const formProps = {
action: '//xxxx.us13.list-manage.com/subscribe/post?u=695fze434a101fd2a718afddde8&id=72al97ece5',
messages: {
inputPlaceholder: "Votre email",
btnLabel: "Envoyer",
sending: "Envoi en cours...",
success: "Merci de votre intérêt!",
error: "Oops, impossible d'enregistrer cette adresse"
},
styles: {
sending: {
fontSize: 18,
color: "auto"
},
success: {
fontSize: 18,
color: "green"
},
error: {
fontSize: 18,
color: "red"
}
}
}
const Form = () => <SubscribeFrom {...formProps}/>