You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Input[]` is an array of objects with following properties
62
48
63
-
`inputs` is an array of objects that are constructed of
49
+
| prop | required | type | default |
50
+
| ----------- | :------: | :------: | ------- |
51
+
| maxLength | yes |`number`||
52
+
| placeholder | no |`string`|`''`|
64
53
65
-
```js static
66
-
{
67
-
type:'number'|'text';
68
-
maxLength: number;
69
-
placeholder: string;
70
-
min?: number;
71
-
max?: number;
54
+
`styles` prop is an object with properties to style each part of the component. You could then give it custom styles as you normally would for inline, e.g.
55
+
56
+
```js
57
+
conststyles= {
58
+
container: {
59
+
width:'auto',
60
+
},
61
+
label: {
62
+
width:'100%',
63
+
color:'#4A5568',
64
+
fontWeight:'bold',
65
+
marginBottom:'0.3em',
66
+
fontSize:'15px',
67
+
display:'block',
68
+
},
69
+
inputContainer: {
70
+
display:'flex',
71
+
justifyContent:'space-between',
72
+
width:'100%',
73
+
},
74
+
input: {
75
+
borderRadius:'5px',
76
+
padding:'0.75em 1em',
77
+
border:'1px solid #A0AEC0',
78
+
color:'#2D3748',
79
+
maxWidth:'7em',
80
+
},
81
+
error: {
82
+
boxSizing:'border-box',
83
+
marginTop:'0.7em',
84
+
padding:'0.75em 1em',
85
+
backgroundColor:'#FED7D7',
86
+
display:'block',
87
+
borderRadius:'5px',
88
+
fontWeight:'bold',
89
+
color:'#C53030',
90
+
fontSize:'13px',
91
+
width:'100%',
92
+
},
72
93
}
73
94
```
74
95
@@ -85,10 +106,12 @@ yarn
85
106
yarn start
86
107
```
87
108
88
-
Optional: To enable styles in styleguidist, uncomment `.scss` styles import on line 5 in `src/components/index.tsx`.
109
+
Storybook starts on `localhost:3001`.
89
110
90
-
When done
111
+
## Build
91
112
92
113
```
93
114
yarn build
94
-
```
115
+
```
116
+
117
+
Build script builds component only. Storybook is built with `storybook:build` by [Netlify](https://www.netlify.com/).
0 commit comments