@itwin/quantity-formatting-react
Version:
React components and utilities for quantity formatting
30 lines • 1.05 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Select } from "@itwin/itwinui-react";
import { useTranslation } from "../../../../useTranslation.js";
/** Component use to set Station size (number of digits from right until '+').
* @internal
*/
export function StationSizeSelector(props) {
const { value, onChange, id } = props;
const { translate } = useTranslation();
const separatorOptions = [
{
value: 1,
label: translate("QuantityFormat:station_size.one"),
},
{
value: 2,
label: translate("QuantityFormat:station_size.two"),
},
{
value: 3,
label: translate("QuantityFormat:station_size.three"),
},
{
value: 4,
label: translate("QuantityFormat:station_size.four"),
},
];
return (_jsx(Select, { options: separatorOptions, value: value, onChange: (newValue) => onChange(newValue), size: "small", id: id }));
}
//# sourceMappingURL=StationSizeSelector.js.map