1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-07-07 15:18:13 +00:00
trezor-wallet/src/utils/uiUtils.js
2019-04-29 17:08:06 +02:00

17 lines
411 B
JavaScript

/* @flow */
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
export const getBottomText = (error: any, warning: any, info: any): React.Node => {
if (error) {
return <FormattedMessage {...error} />;
}
if (warning) {
return <FormattedMessage {...warning} />;
}
if (info) {
return <FormattedMessage {...info} />;
}
return null;
};