2.0.3 • Published 7 years ago

ssml-jsx v2.0.3

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

ssml-jsx

Write SSML inline within JavaScript.

You can use SSML directly by including babel-plugin-transform-react-jsx in your .babelrc and importing ssml from ssml-jsx.

{
  "plugins": [
    ["transform-react-jsx", { "pragma": "ssml" }]
  ]
}
import ssml, { renderToString } from 'ssml-jsx';

const speech = (
  <speak>
    <p>Hello world!</p>
    <break time='2s' />
    <p>What would you like to do today?</p>
  </speak>
);