UNPKG

@nexusui/components

Version:

These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.

38 lines (37 loc) 1.04 kB
import React from 'react'; import { TextFieldProps } from '@mui/material/TextField'; export type EmailValid = { email: string; valid: boolean; }; export type IEmailInput = { /** * Emails chip * * ``` * export type EmailValid = { * email: string, * valid: boolean * } * ``` */ emails: ReadonlyArray<EmailValid>; /** * Maximum number of emails/recipients allowed * @default undefined (no limitation) */ emailLimit?: number; /** * Once emails chip changed */ onEmailsChange: (emails: ReadonlyArray<EmailValid>, incompleteEmail?: EmailValid) => void; /** * Once all emails are filled in, hitting enter again will trigger this event */ onEnterKeySubmit?: () => void; }; /** * The props type of [[`EmailInput`]]. */ export type IEmailInputProps = Omit<TextFieldProps, 'value'> & IEmailInput; export declare const EmailInput: React.ForwardRefExoticComponent<Omit<IEmailInputProps, "ref"> & React.RefAttributes<unknown>>;