-
Notifications
You must be signed in to change notification settings - Fork 836
/
textarea.ts
47 lines (44 loc) · 1.19 KB
/
textarea.ts
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
import omit from 'just-omit';
import {Textarea, SIZE, ADJOINED} from 'baseui/textarea';
import {PropTypes} from 'react-view';
import {TConfig} from '../types';
import {theme, inputProps} from './input';
const textareaProps = require('!!extract-react-types-loader!../../../../src/textarea/textarea.js');
const TextareaConfig: TConfig = {
imports: {
'baseui/textarea': {named: ['Textarea']},
},
scope: {
Textarea,
SIZE,
ADJOINED,
},
theme,
props: {
...omit(inputProps, ['type', 'startEnhancer', 'endEnhancer']),
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: ['Input', 'InputContainer'],
sharedProps: {
$isFocused: {
type: PropTypes.Boolean,
description: 'True when the component is focused.',
},
$disabled: 'disabled',
$error: 'error',
$positive: 'positive',
$adjoined: 'adjoined',
$size: 'size',
$required: 'required',
},
},
},
},
mapTokensToProps: {
Textarea: textareaProps,
},
};
export default TextareaConfig;