react-cron-generator 2.0.11 → 2.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,7 +9,9 @@ Package helps to build linux scheduler cron expression.
9
9
  [![npm version](https://badge.fury.io/js/react-cron-generator.svg)](https://badge.fury.io/js/react-cron-generator) ![Downloads](https://img.shields.io/npm/dm/react-cron-generator.svg)
10
10
  <a href="https://github.com/sojinantony01/react-spread-sheet/blob/main/LICENSE">
11
11
  <img src="https://img.shields.io/npm/l/react-cron-generator.svg" alt="license">
12
- </a>
12
+ </a> <span>E2E tests passing.</span>
13
+
14
+
13
15
 
14
16
  ```
15
17
  data = '* * * * * * *'
@@ -27,32 +29,25 @@ npm install react-cron-generator
27
29
 
28
30
 
29
31
  ```
30
- import React, { Component } from 'react'
32
+ import React, { useState } from 'react'
31
33
  import Cron from 'react-cron-generator'
32
34
  import 'react-cron-generator/dist/cron-builder.css'
33
35
 
34
36
 
35
- class App extends Component {
36
-
37
- constructor(props) {
38
- super(props);
39
- this.state = {
40
-
41
- };
42
- }
43
-
44
- render() {
45
- return (<div>
46
- <Cron
47
- onChange={(e)=> {this.setState({value:e});}}
48
- value={this.state.value}
49
- showResultText={true}
50
- showResultCron={true}
51
- />
52
-
53
- </div>)
54
- }
55
- }
37
+ const App = () => {
38
+ const [state, setState] = useState<State>({});
39
+
40
+ return (
41
+ <Cron
42
+ onChange={(e, text) => {
43
+ setState({ value: e });
44
+ }}
45
+ value={state.value}
46
+ showResultText={true}
47
+ showResultCron={true}
48
+ />
49
+ );
50
+ };
56
51
 
57
52
  export default App;
58
53