@eturnity/eturnity_reusable_components 7.39.4-qa-elisee-7.42.0 → 7.39.4-qa-elisee-7.42.1
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -4,73 +4,67 @@ export default {
|
|
4
4
|
title: 'InputText',
|
5
5
|
component: InputText,
|
6
6
|
tags: ['autodocs'],
|
7
|
-
// argTypes: {},
|
8
7
|
}
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
// import InputText from "@eturnity/eturnity_reusable_components/src/components/inputs/inputText"
|
10
|
+
// To use:
|
11
|
+
// <input-text
|
12
|
+
// placeholder="Company name"
|
13
|
+
// :value="companyName"
|
14
|
+
// @input-change="onInputChange({ value: $event, type: 'companyName' })"
|
15
|
+
// :isError="checkErrors()"
|
16
|
+
// :errorMessage="This is my error message"
|
17
|
+
// infoTextAlign="right" // left by default
|
18
|
+
// infoTextMessage="My info message"
|
19
|
+
// label="Question 5"
|
20
|
+
// alignItems="horizontal" // horizontal, vertical
|
21
|
+
// inputWidth="250px"
|
22
|
+
// minWidth="100px"
|
23
|
+
// />
|
16
24
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
// alignItems="horizontal" // horizontal, vertical
|
29
|
-
// inputWidth="250px"
|
30
|
-
// minWidth="100px"
|
31
|
-
// />
|
32
|
-
})
|
33
|
-
|
34
|
-
export const Default = Template.bind({})
|
35
|
-
Default.args = {
|
36
|
-
placeholder: 'Company name',
|
37
|
-
disabled: false,
|
38
|
-
value: '',
|
39
|
-
inputWidth: '200px',
|
40
|
-
minWidth: '10ch',
|
41
|
-
unitName: 'pc',
|
42
|
-
isError: false,
|
43
|
-
textAlign: 'left',
|
25
|
+
export const Default = {
|
26
|
+
args: {
|
27
|
+
placeholder: 'Company name',
|
28
|
+
disabled: false,
|
29
|
+
value: '',
|
30
|
+
inputWidth: '200px',
|
31
|
+
minWidth: '10ch',
|
32
|
+
isError: false,
|
33
|
+
label: 'label test',
|
34
|
+
labelOptional: true,
|
35
|
+
},
|
44
36
|
}
|
45
37
|
|
46
|
-
export const HasError =
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
38
|
+
export const HasError = {
|
39
|
+
args: {
|
40
|
+
placeholder: 'Enter Value',
|
41
|
+
errorMessage: 'This field is required',
|
42
|
+
isError: true,
|
43
|
+
disabled: false,
|
44
|
+
inputWidth: '200px',
|
45
|
+
},
|
53
46
|
}
|
54
47
|
|
55
|
-
export const Disabled =
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
48
|
+
export const Disabled = {
|
49
|
+
args: {
|
50
|
+
placeholder: 'Enter Value',
|
51
|
+
disabled: true,
|
52
|
+
value: '',
|
53
|
+
inputWidth: '200px',
|
54
|
+
isError: false,
|
55
|
+
},
|
62
56
|
}
|
63
57
|
|
64
|
-
export const WithLabel =
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
58
|
+
export const WithLabel = {
|
59
|
+
args: {
|
60
|
+
placeholder: 'Company name',
|
61
|
+
disabled: false,
|
62
|
+
label: 'What is the best company in Switzerland?',
|
63
|
+
value: 'Eturnity',
|
64
|
+
inputWidth: '200px',
|
65
|
+
unitName: 'pc',
|
66
|
+
isError: false,
|
67
|
+
errorMessage: 'Maximum 5 characters',
|
68
|
+
alignItems: 'vertical',
|
69
|
+
},
|
76
70
|
}
|