[I18n] Fix wrong FormattedMessage example in readme (#27035) (#27113)

This commit is contained in:
Leanid Shutau 2018-12-13 13:44:23 +03:00 committed by GitHub
parent 786cd234d9
commit bb50f4e69c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -209,7 +209,7 @@ ReactDOM.render(
```
After that we can use `FormattedMessage` components inside `RootComponent`:
```js
```jsx
import React, { Component } from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
@ -233,10 +233,10 @@ class RootComponent extends Component {
<p>
<FormattedMessage
id="welcome"
defaultMessage={`Hello {name}, you have {unreadCount, number} {unreadCount, plural,
defaultMessage="Hello {name}, you have {unreadCount, number} {unreadCount, plural,
one {message}
other {messages}
}`}
}"
values={{name: <b>{name}</b>, unreadCount}}
/>
...