UNPKG

@etsoo/materialui

Version:

TypeScript Material-UI Implementation

21 lines (20 loc) 803 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.NumberText = NumberText; const jsx_runtime_1 = require("react/jsx-runtime"); const shared_1 = require("@etsoo/shared"); const Typography_1 = __importDefault(require("@mui/material/Typography")); /** * Number text * @param props Props * @returns Component */ function NumberText(props) { // Destruct const { locale, options = {}, value, ...rest } = props; // Layout return ((0, jsx_runtime_1.jsx)(Typography_1.default, { component: "span", fontSize: "inherit", ...rest, children: value == null ? "" : shared_1.NumberUtils.format(value, locale, options) })); }