UNPKG

@sb1/ffe-account-selector-react

Version:

Selector for bank accounts with autocomplete.

15 lines (14 loc) 973 B
import React from 'react'; import { MicroText } from '@sb1/ffe-core-react'; import classnames from 'classnames'; import { balanceWithCurrency, accountFormatter } from '../format'; export function AccountActionBody(_a) { var item = _a.item, isHighlighted = _a.isHighlighted, showBalance = _a.showBalance, locale = _a.locale; return (React.createElement("div", { className: classnames('ffe-searchable-dropdown__list-item-body', { 'ffe-searchable-dropdown__list-item-body--highlighted': isHighlighted, }) }, item.name, React.createElement("div", { className: "ffe-searchable-dropdown__list-item-body-details" }, React.createElement(MicroText, { className: "ffe-searchable-dropdown__detail-text" }, accountFormatter(item.accountNumber)), showBalance && (React.createElement(MicroText, { className: "ffe-searchable-dropdown__detail-text" }, balanceWithCurrency(item.balance, locale, item.currencyCode)))))); }