How to use the vtex.native-types.formatIOMessage function in vtex

To help you get started, weā€™ve selected a few vtex 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 vtex-apps / store-components / react / components / InfoCard / index.js View on Github external
? safelyGetToken(itemsTokens, textPosition, 'textPosition')
    : safelyGetToken(itemsTokens, textAlignment, 'textAlignment')
  const justifyToken = safelyGetToken(
    justifyTokens,
    textPosition,
    'textPosition'
  )
  const flexOrderToken = safelyGetToken(
    flexOrderTokens,
    textPosition,
    'textPosition'
  )

  const finalImageUrl = getImageUrl(
    mobile,
    formatIOMessage({ id: imageUrl, intl }),
    formatIOMessage({ id: mobileImageUrl, intl })
  )

  const containerStyle = isFullModeStyle
    ? { backgroundImage: `url(${finalImageUrl})`, backgroundSize: 'cover' }
    : {}

  const containerClasses = classNames(
    `${handles.infoCardContainer} items-center`,
    {
      [`flex-ns ${flexOrderToken} bg-base ph2-ns pb2 justify-between`]: !isFullModeStyle,
      [`bg-center bb b--muted-4 flex ${justifyToken}`]: isFullModeStyle,
    }
  )

  const textContainerClasses = classNames(
github vtex-apps / store-components / react / components / Newsletter / index.js View on Github external
const submitText = formatIOMessage({ id: submit, intl })
    const labelText = formatIOMessage({ id: label, intl })
    const placeholderText = formatIOMessage({ id: placeholder, intl })
    const confirmationTitle = formatIOMessage({
      id: 'store/newsletter.confirmationTitle',
      intl,
    })
    const confirmationText = formatIOMessage({
      id: 'store/newsletter.confirmationText',
      intl,
    })
    const invalidEmailText = formatIOMessage({
      id: 'store/newsletter.invalidEmail',
      intl,
    })
    const errorMsg = formatIOMessage({
      id: 'store/newsletter.error',
      intl,
    })

    return (
      <div>
        <div>
          {this.state.success ? (
            
              <div>
                {confirmationTitle}
              </div></div></div>
github vtex-apps / store-components / react / components / Newsletter / index.js View on Github external
render() {
    const { hideLabel, intl, submit, label, placeholder, cssHandles } = this.props
    const submitText = formatIOMessage({ id: submit, intl })
    const labelText = formatIOMessage({ id: label, intl })
    const placeholderText = formatIOMessage({ id: placeholder, intl })
    const confirmationTitle = formatIOMessage({
      id: 'store/newsletter.confirmationTitle',
      intl,
    })
    const confirmationText = formatIOMessage({
      id: 'store/newsletter.confirmationText',
      intl,
    })
    const invalidEmailText = formatIOMessage({
      id: 'store/newsletter.invalidEmail',
      intl,
    })
    const errorMsg = formatIOMessage({
      id: 'store/newsletter.error',
github vtex-apps / store-components / react / components / Newsletter / index.js View on Github external
render() {
    const { hideLabel, intl, submit, label, placeholder, cssHandles } = this.props
    const submitText = formatIOMessage({ id: submit, intl })
    const labelText = formatIOMessage({ id: label, intl })
    const placeholderText = formatIOMessage({ id: placeholder, intl })
    const confirmationTitle = formatIOMessage({
      id: 'store/newsletter.confirmationTitle',
      intl,
    })
    const confirmationText = formatIOMessage({
      id: 'store/newsletter.confirmationText',
      intl,
    })
    const invalidEmailText = formatIOMessage({
      id: 'store/newsletter.invalidEmail',
      intl,
    })
    const errorMsg = formatIOMessage({
      id: 'store/newsletter.error',
      intl,
    })

    return (
      <div>
        <div>
          {this.state.success ? (</div></div>
github vtex-apps / store-components / react / components / Image / index.js View on Github external
const renderImg = ({src, alt, maxWidth, maxHeight, srcSet, sizes, blockClass, intl}) =&gt; {
  const classes = generateBlockClass(styles.imageElement, blockClass)
  const maxDimensions = {
    maxWidth: maxWidth,
    maxHeight: maxHeight,
  }

  const formattedSrc = formatIOMessage({ id: src, intl })
  const formattedAlt = formatIOMessage({ id: alt, intl })
  return (
    <img style="{maxDimensions}" alt="{formattedAlt}" sizes="{sizes}" srcset="{srcSet}" src="{formattedSrc}">
  )
}
github vtex-apps / store-components / react / components / Newsletter / index.js View on Github external
render() {
    const { hideLabel, intl, submit, label, placeholder, cssHandles } = this.props
    const submitText = formatIOMessage({ id: submit, intl })
    const labelText = formatIOMessage({ id: label, intl })
    const placeholderText = formatIOMessage({ id: placeholder, intl })
    const confirmationTitle = formatIOMessage({
      id: 'store/newsletter.confirmationTitle',
      intl,
    })
    const confirmationText = formatIOMessage({
      id: 'store/newsletter.confirmationText',
      intl,
    })
    const invalidEmailText = formatIOMessage({
      id: 'store/newsletter.invalidEmail',
      intl,
    })
    const errorMsg = formatIOMessage({
      id: 'store/newsletter.error',
      intl,
    })
github vtex-apps / store-components / react / components / Newsletter / index.js View on Github external
render() {
    const { hideLabel, intl, submit, label, placeholder, cssHandles } = this.props
    const submitText = formatIOMessage({ id: submit, intl })
    const labelText = formatIOMessage({ id: label, intl })
    const placeholderText = formatIOMessage({ id: placeholder, intl })
    const confirmationTitle = formatIOMessage({
      id: 'store/newsletter.confirmationTitle',
      intl,
    })
    const confirmationText = formatIOMessage({
      id: 'store/newsletter.confirmationText',
      intl,
    })
    const invalidEmailText = formatIOMessage({
      id: 'store/newsletter.invalidEmail',
      intl,
    })
    const errorMsg = formatIOMessage({
      id: 'store/newsletter.error',
      intl,
    })
github vtex-apps / store-components / react / components / Newsletter / index.js View on Github external
render() {
    const { hideLabel, intl, submit, label, placeholder, cssHandles } = this.props
    const submitText = formatIOMessage({ id: submit, intl })
    const labelText = formatIOMessage({ id: label, intl })
    const placeholderText = formatIOMessage({ id: placeholder, intl })
    const confirmationTitle = formatIOMessage({
      id: 'store/newsletter.confirmationTitle',
      intl,
    })
    const confirmationText = formatIOMessage({
      id: 'store/newsletter.confirmationText',
      intl,
    })
    const invalidEmailText = formatIOMessage({
      id: 'store/newsletter.invalidEmail',
      intl,
    })
    const errorMsg = formatIOMessage({
      id: 'store/newsletter.error',
      intl,
github vtex-apps / store-components / react / components / InfoCard / index.js View on Github external
    () => sanitizeHtml(formatIOMessage({ id: subhead, intl })),
    [intl, subhead]
github vtex-apps / store-components / react / components / Newsletter / index.js View on Github external
render() {
    const { hideLabel, intl, submit, label, placeholder, cssHandles } = this.props
    const submitText = formatIOMessage({ id: submit, intl })
    const labelText = formatIOMessage({ id: label, intl })
    const placeholderText = formatIOMessage({ id: placeholder, intl })
    const confirmationTitle = formatIOMessage({
      id: 'store/newsletter.confirmationTitle',
      intl,
    })
    const confirmationText = formatIOMessage({
      id: 'store/newsletter.confirmationText',
      intl,
    })
    const invalidEmailText = formatIOMessage({
      id: 'store/newsletter.invalidEmail',
      intl,
    })
    const errorMsg = formatIOMessage({
      id: 'store/newsletter.error',
      intl,
    })

    return (