-
Notifications
You must be signed in to change notification settings - Fork 4k
Expand file tree
/
Copy pathInput.d.ts
More file actions
83 lines (58 loc) · 2.28 KB
/
Input.d.ts
File metadata and controls
83 lines (58 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import * as React from 'react'
import { ForwardRefComponent, HtmlInputrops, SemanticShorthandItem } from '../../generic'
import { LabelProps } from '../Label'
export interface InputProps extends StrictInputProps {
[key: string]: any
}
export interface StrictInputProps {
/** An element type to render as (string or function). */
as?: any
/** An Input can be formatted to alert the user to an action they may perform. */
action?: any | boolean
/** An action can appear along side an Input on the left or right. */
actionPosition?: 'left'
/** Primary content. */
children?: React.ReactNode
/** Additional classes. */
className?: string
/** An Input field can show that it is disabled. */
disabled?: boolean
/** An Input field can show the data contains errors. */
error?: boolean
/** Take on the size of its container. */
fluid?: boolean
/** An Input field can show a user is currently interacting with it. */
focus?: boolean
/** Optional Icon to display inside the Input. */
icon?: any | SemanticShorthandItem<InputProps>
/** An Icon can appear inside an Input on the left. */
iconPosition?: 'left'
/** Shorthand for creating the HTML Input. */
input?: SemanticShorthandItem<HtmlInputrops>
/** Format to appear on dark backgrounds. */
inverted?: boolean
/** Optional Label to display along side the Input. */
label?: SemanticShorthandItem<LabelProps>
/** A Label can appear outside an Input on the left or right. */
labelPosition?: 'left' | 'right' | 'left corner' | 'right corner'
/** An Icon Input field can show that it is currently loading data. */
loading?: boolean
/**
* Called on change.
*
* @param {ChangeEvent} event - React's original SyntheticEvent.
* @param {object} props - All props.
* @param {string} value - The value of the input.
*/
onChange?: (event: React.ChangeEvent<HTMLInputElement>, props: InputProps, value: string) => void
/** An Input can vary in size. */
size?: 'mini' | 'small' | 'large' | 'big' | 'huge' | 'massive'
/** An Input can receive focus. */
tabIndex?: number | string
/** Transparent Input has no background. */
transparent?: boolean
/** The HTML input type. */
type?: string
}
declare const Input: ForwardRefComponent<InputProps, HTMLInputElement>
export default Input