UNPKG

1.09 kBTypeScriptView Raw
1import { IInput } from "../Input";
2import * as React from "react";
3import { BoxProps } from "../Box";
4import { Omit } from "../common-types";
5
6interface IInputElement {
7 /**
8 * The size of the adornment is inherited from the `InputGroup` via `cloneElement`.
9 */
10 size?: IInput["size"];
11 /**
12 * The position this adornment should appear relative to the `Input`.
13 * We added `InputLeftElement` and `InputRightElement` so you might not need to pass this
14 */
15 placement?: "left" | "right";
16 /**
17 * The content of the component, normally an `IconButton` or string.
18 */
19 children: React.ReactNode;
20 /**
21 * Disable pointer events on this component.
22 * This allows for the content of the adornment to focus the input on click.
23 */
24 disabledPointerEvents?: boolean;
25}
26
27type IInputElementProps = IInputElement & BoxProps;
28
29declare const InputElement: React.FC<IInputElementProps>;
30export default InputElement;
31
32export const InputLeftElement: React.FC<Omit<IInputElementProps, "placement">>;
33export const InputRightElement: React.FC<Omit<IInputElementProps, "placement">>;