UNPKG

@etsoo/materialui

Version:

TypeScript Material-UI Implementation

23 lines (22 loc) 1.01 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { useAppContext } from "./app/ReactApp"; import { MUGlobal } from "./MUGlobal"; import { InputField } from "./InputField"; /** * Email input * @param props Props */ export function EmailInput(props) { // Global app const app = 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 (_jsx(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.inputFieldShrink, ...inputLabel }, ...restSlotProps }, ...rest })); }