@etsoo/smarterp-core
Version:
TypeScript APIs for SmartERP Core
16 lines (15 loc) • 589 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { ComboBox } from "@etsoo/materialui";
import { useRequiredAppContext } from "../../ICoreServiceApp";
/**
* Product base units component
* @param props Props
* @returns Component
*/
export function ProductBaseUnits(props) {
// App
const app = useRequiredAppContext();
// Destruct
const { isJoined, label = app.get("baseUnit") ?? "Base unit", name = "baseUnit", options, ...rest } = props;
return (_jsx(ComboBox, { name: name, label: label, options: app.core.publicApi.units(options, isJoined), ...rest }));
}