How to use the react-intl-universal.getHTML function in react-intl-universal

To help you get started, we’ve selected a few react-intl-universal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pythonkr / pyconkr-web / components / atoms / Paragraph.tsx View on Github external
export const Paragraph: React.SFC = ({ intlKey,  children, bold}) =>
  
    {bold ? <b>{intlKey
      ? intl.getHTML(intlKey)
        .defaultMessage(children)
      : children
    }</b> : intlKey
      ? intl.getHTML(intlKey)
        .defaultMessage(children)
      : children
    }
github alibaba / react-intl-universal / examples / browser-example / src / Html.js View on Github external
render() {
    return (
      <div>
        <div>Html Examples:</div>
        <div>{intl.getHTML('TIP')}</div>
        <div>{intl.getHTML('TIP_VAR', {message: 'HTML with variables'})}</div>
        <div>{intl.getHTML('TIP_VAR', {message: ''})}</div>
      </div>
    )
  }
}
github alibaba / react-intl-universal / examples / browser-example / src / Html.js View on Github external
render() {
    return (
      <div>
        <div>Html Examples:</div>
        <div>{intl.getHTML('TIP')}</div>
        <div>{intl.getHTML('TIP_VAR', {message: 'HTML with variables'})}</div>
        <div>{intl.getHTML('TIP_VAR', {message: ''})}</div>
      </div>
    )
  }
}
github pythonkr / pyconkr-web / components / atoms / IntlText.tsx View on Github external
export const IntlText: React.SFC&gt; = ({ intlKey, children }) =&gt; {
  return (
    &lt;&gt;
      {intl.getHTML(intlKey).defaultMessage(children as string | JSX.Element)}
    
  )
}
github pythonkr / pyconkr-web / components / atoms / Span.tsx View on Github external
export const Span: React.SFC = ({ intlKey,  children, bold}) =&gt;
  
    {bold ? <b>{intlKey
      ? intl.getHTML(intlKey).defaultMessage(children)
      : children
    }</b> : intlKey
      ? intl.getHTML(intlKey).defaultMessage(children)
      : children
    }

react-intl-universal

Internationalize React apps. Not only for React component but also for Vanilla JS.

BSD-3-Clause
Latest version published 6 days ago

Package Health Score

71 / 100
Full package analysis