UNPKG

bananas-commerce-admin

Version:

What's this, an admin for apes?

20 lines 707 B
import React from "react"; import { Typography } from "@mui/material"; export const getPurchaseItemTitle = (items) => { const normalizedItems = items?.filter((item) => item.line_number == null || Number.isInteger(item.line_number)) ?? []; const [first, ...rest] = normalizedItems; if (!first) { return "—"; } if (rest.length === 0) { return first.name; } return (React.createElement(React.Fragment, null, first.name, " ", React.createElement(Typography, { color: "text.disabled", component: "span", variant: "inherit" }, "+", rest.length, " more"))); }; //# sourceMappingURL=purchase_item_title.js.map