UNPKG

@etsoo/smarterp-core

Version:

TypeScript APIs for SmartERP Core

19 lines (18 loc) 763 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ProductBaseUnits = ProductBaseUnits; const jsx_runtime_1 = require("react/jsx-runtime"); const materialui_1 = require("@etsoo/materialui"); const ICoreServiceApp_1 = require("../../ICoreServiceApp"); /** * Product base units component * @param props Props * @returns Component */ function ProductBaseUnits(props) { // App const app = (0, ICoreServiceApp_1.useRequiredAppContext)(); // Destruct const { isJoined, label = app.get("baseUnit") ?? "Base unit", name = "baseUnit", options, ...rest } = props; return ((0, jsx_runtime_1.jsx)(materialui_1.ComboBox, { name: name, label: label, options: app.core.publicApi.units(options, isJoined), ...rest })); }