UNPKG

beta-parity-react

Version:

Beta Parity React Components

56 lines 1.75 kB
import React from 'react'; import './index.css'; import { Input } from '../BaseInput'; /** * Props for the EmailInput component. * * Extends properties from the `Input` component. */ export interface EmailInputProps extends React.ComponentPropsWithoutRef<typeof Input> { /** * Specifies the domain or list of domains to use as suggestions for the email input. * - If a string is provided, it is treated as a single domain. * - If an array of strings is provided, the component suggests multiple domains. * * Example: * ```tsx * domain="example.com" * domain={["example.com", "test.com"]} * ``` * @memberof EmailInputProps * */ domain?: string | string[]; /** * Callback function triggered when the user selects or changes the domain. * Provides the updated domain as a string. * * Example: * ```tsx * onDomainChange={(domain) => console.log('Selected domain:', domain)} * ``` * @memberof EmailInputProps * @param {string} domain The updated domain value. */ onDomainChange?: (domain: string) => void; /** * The currently selected domain value. * This can be used for controlled components where the domain value * is managed outside the component. * * Example: * ```tsx * <EmailInput domainValue="example.com" /> * ``` * @memberof EmailInputProps * */ domainValue?: string; } /** * **Parity EmailInput**. * * @see {@link https://beta-parity-react.vercel.app/email-input Parity EmailInput} */ export declare const EmailInput: React.ForwardRefExoticComponent<EmailInputProps & React.RefAttributes<HTMLInputElement>>; //# sourceMappingURL=index.d.ts.map