Skip to content

Commit bb56eb7

Browse files
committed
readme draft
1 parent ce0a612 commit bb56eb7

File tree

5 files changed

+55
-3
lines changed

5 files changed

+55
-3
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,45 @@
1-
- label
1+
- prepare Readme
22
- disable style
33
- run tests & update snapshots
44
- build package
55
- deploy package
66
- build static site
77
- website deploy script
8+
9+
# React Multi Fields Input component
10+
11+
React Multi Fields Input component comes with zero styles to allow you style it in accordance to your style guidelines.
12+
13+
![react-multi-fields-input component](https://github.com/kakuevn/react-multi-fields-input/raw/develop/src/assets/rmfi.png)
14+
15+
Props that MultiFieldsInput component accepts:
16+
17+
```js static
18+
{
19+
inputs: Inputs[];
20+
name: string;
21+
onBlur(target: Target): void;
22+
onChange(target: Target): void;
23+
isValid?: boolean;
24+
value?: string;
25+
autoFocus?: boolean;
26+
}
27+
```
28+
29+
`inputs` is an array of objects that are constructed of
30+
31+
```js static
32+
{
33+
type: 'number' | 'text';
34+
maxLength: number;
35+
placeholder: string;
36+
min?: number;
37+
max?: number;
38+
}
39+
```
40+
41+
The values that are being returned `onBlur` and `onChange` (i.e. `Target` interface):
42+
43+
```js static
44+
{ name: '', value: ''}
45+
```

assets/rmfi.PNG

2.8 KB
Loading

dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
React Multi Fields Input component comes with zero styles to allow you style it in accordance to your style guidelines.
2+
13
Props that MultiFieldsInput component accepts:
24

35
```js static

src/components/index.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
2+
3+
.rmfi-container {
4+
font-family: 'Open Sans', sans-serif;
5+
}
6+
17
.rmfi-input {
28
border: 1px solid #ecf0f1;
39
padding: 1em 1.5em;
@@ -21,3 +27,9 @@
2127
.rmfi-error {
2228
border-color: #e74c3c;
2329
}
30+
31+
.rmfi-label {
32+
display: block;
33+
font-size: 0.8em;
34+
font-weight: bold;
35+
}

0 commit comments

Comments
 (0)