@helpusersvote/election-copy

0.0.1 • Public • Published

@helpusersvote/election-copy

JavaScript functions to render election-related CTAs

Installation

First, add the module to your codebase:

npm install --save @helpusersvote/election-copy

Usage

In your app, import functions and text from the @helpusersvote/election-copy module:

import { getElectionText, electionCopy } from '@helpusersvote/election-copy'

// Pass in optional configuration to `getElectionText()`

const {
  // Election day is in 3 days!
  titleText,
  // Get ready to vote
  ctaText,
  // https://vote.org
  ctaHref
} = getElectionText({ type: 'countdown', daysLeft: 3 })

// Or get the static text directly with `electionCopy`

const {
  text: {
    registration: {
      // Get ready to vote in 2018!
      title: titleText,
      // Check if you're registered today
      cta: ctaText
    }
  }
} = electionCopy

License

All modules are open-sourced under the MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i @helpusersvote/election-copy

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

2.45 kB

Total Files

6

Last publish

Collaborators

  • fouad