@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
21 lines (19 loc) • 574 B
JavaScript
const getInputMode = (step, precision, os) => {
if (Number.isInteger(step) && step >= 0 && precision === 0)
return "numeric";
if (!Number.isInteger(step) && step >= 0 && precision !== 0)
return "decimal";
if (Number.isInteger(step) && step < 0 && precision === 0) {
if (os === "ios")
return "text";
return "decimal";
}
if (!Number.isInteger(step) && step < 0 && precision !== 0) {
if (os === "ios")
return "text";
return "decimal";
}
return "numeric";
};
export { getInputMode };
//# sourceMappingURL=get-input-mode.js.map