@etsoo/materialui
Version:
TypeScript Material-UI Implementation
17 lines (16 loc) • 576 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { NumberUtils } from "@etsoo/shared";
import Typography from "@mui/material/Typography";
/**
* Money text
* @param props Props
* @returns Component
*/
export function MoneyText(props) {
// Destruct
const { currency, isInteger = false, locale, options = {}, value, ...rest } = props;
// Layout
return (_jsx(Typography, { component: "span", fontSize: "inherit", ...rest, children: value == null
? ""
: NumberUtils.formatMoney(value, currency, locale, isInteger, options) }));
}