UNPKG

@etsoo/materialui

Version:

TypeScript Material-UI Implementation

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