Skip to content

Commit ddc5eb3

Browse files
committed
clean up
2 parents aef10fa + 5a46c87 commit ddc5eb3

File tree

6 files changed

+36
-24
lines changed

6 files changed

+36
-24
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 OlivierJM
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@ npm install --save react-dynamic-fields
1313
## Usage
1414

1515
```tsx
16-
import React, { Component } from 'react'
17-
18-
import MyComponent from 'react-dynamic-fields'
19-
import 'react-dynamic-fields/dist/index.css'
20-
21-
class Example extends Component {
22-
render() {
23-
return <MyComponent />
24-
}
16+
import React from 'react'
17+
import SingleField from 'react-dynamic-fields'
18+
19+
const App = () => {
20+
const [options, setOptions] = React.useState([''])
21+
return (
22+
<SingleField
23+
options={options}
24+
setOptions={setOptions}
25+
label='Types of fruits'
26+
/>
27+
)
2528
}
2629
```
2730

example/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
This example was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
2-
3-
It is linked to the react-dynamic-fields package in the parent directory for development purposes.
4-
5-
You can run `yarn install` and then `yarn start` to test your package.
1+
This is an example on how to make use of the react-dynamic-fields

example/src/App.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import React from 'react'
2-
32
import { SingleField } from 'react-dynamic-fields'
4-
import 'react-dynamic-fields/dist/index.css'
53

64
const App = () => {
75
const [options, setOptions] = React.useState([''])

src/index.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { ExampleComponent } from '.'
1+
import { SingleField } from '.'
22

33
describe('ExampleComponent', () => {
44
it('is truthy', () => {
5-
expect(ExampleComponent).toBeTruthy()
5+
expect(SingleField).toBeTruthy()
66
})
77
})

src/index.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
// import * as React from 'react'
2-
// import styles from './styles.module.css'
31
import SingleField from './SingleField'
42

5-
// interface Props {
6-
// text: string
7-
// }
8-
93
export { SingleField }

0 commit comments

Comments
 (0)