ssml-jsx
v2.0.3
Published
Write SSML inline within javascript files using JSX
Downloads
80
Maintainers
Readme
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>
);