UNPKG

775 BTypeScriptView Raw
1import * as React from "react";
2import { IInput } from "../Input";
3import { BoxProps } from "../Box";
4
5interface IInputAddon {
6 /**
7 * The content of the `InputAddon`
8 */
9 children: React.ReactNode;
10 /**
11 * The size of the addon is inherited from the `InputGroup` via `cloneElement`.
12 */
13 size?: IInput["size"];
14 /**
15 * The position the addon should appear relative to the `Input`.
16 * We added `InputLeftAddon` and `InputRightAddon` so you might not need to pass this
17 */
18 placement?: "left" | "right";
19}
20
21export type InputAddonProps = IInputAddon & BoxProps;
22
23declare const InputAddon: React.FC<InputAddonProps>;
24
25export default InputAddon;
26export const InputLeftAddon: React.FC<InputAddonProps>;
27export const InputRightAddon: React.FC<InputAddonProps>;