UNPKG

globalbridge-lsf-custom

Version:

GlobalBridge in-house labeling tool, originating from LSF.

12 lines (9 loc) • 370 B
import React from 'react'; import styles from './ErrorMessage.module.scss'; export const ErrorMessage = ({ error }) => { if (typeof error === 'string') { return <div className={styles.error} dangerouslySetInnerHTML={{ __html: error }} />; } const body = error instanceof Error ? error.message : error; return <div className={styles.error}>{body}</div>; };