UNPKG

@etsoo/materialui

Version:

TypeScript Material-UI Implementation

26 lines (25 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MobileInput = MobileInput; const jsx_runtime_1 = require("react/jsx-runtime"); const ReactApp_1 = require("./app/ReactApp"); const MUGlobal_1 = require("./MUGlobal"); const InputField_1 = require("./InputField"); /** * Mobile input * @param props Props */ function MobileInput(props) { // Global app const app = (0, ReactApp_1.useAppContext)(); // Destruct const { slotProps, autoCapitalize = "none", autoCorrect = "off", autoComplete = "mobile", fullWidth = true, label = app?.get("mobile"), name = "mobile", ...rest } = props; // Slot props const { htmlInput, inputLabel, ...restSlotProps } = slotProps ?? {}; // Layout return ((0, jsx_runtime_1.jsx)(InputField_1.InputField, { type: "tel", autoCapitalize: autoCapitalize, autoCorrect: autoCorrect, autoComplete: autoComplete, fullWidth: fullWidth, label: label, name: name, slotProps: { htmlInput: { inputMode: "tel", maxLength: 18, ...htmlInput }, inputLabel: { shrink: MUGlobal_1.MUGlobal.inputFieldShrink, ...inputLabel }, ...restSlotProps }, ...rest })); }