A React cron editor
use online: http://cron.dward.cn/
view demo: https://codesandbox.io/s/fa-cron-react-editor-demo01-pm9iio
# NPM
npm install fa-cron-react-editor
# Yarn
yarn add fa-cron-react-editor
import { CronEditor } from 'fa-cron-react-editor';
import 'fa-cron-react-editor/dist/index.css'
function App() {
const [cron, setCron] = useState<string>('* * * * * ?');
return (
<CronEditor
value={cron}
onChange={setCron}
/>
);
}
Build this library using: react-library-vite-example
First, install the dependencies of the monorepo:
yarn install
Build the library:
cd packages/fa-cron-react-editor && yarn build
Run the development server of the test project:
cd sites/my-site && yarn dev
Open http://localhost:3000 with your browser to see the result.
If you want to start the storybook server, run:
cd packages/fa-cron-react-editor && yarn storybook
- Base cron editor
- Better style
- Locale customization
- Code Sandbox Demo
- Tool Website publish