@helpusersvote/copy

1.0.2 • Public • Published

@helpusersvote/copy

JavaScript functions to render election-related CTAs

Installation

First, add the module to your codebase:

npm install --save @helpusersvote/copy

Usage

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

import { getElectionText, electionCopy } from '@helpusersvote/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' })

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0

Package Sidebar

Install

npm i @helpusersvote/copy

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

3.03 kB

Total Files

6

Last publish

Collaborators

  • fouad