1.0.1 • Published 7 years ago

react-mailchimp-subscribe-scrantonhacks v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

react-mailchimp-subscribe ScrantonHacks fork

made to have a break between the button and input field

npm package

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}/>