Skip to content

FaberSober/fa-cron-react-editor

Repository files navigation

fa-cron-react-editor

A React cron editor

npm package

use online: http://cron.dward.cn/

view demo: https://codesandbox.io/s/fa-cron-react-editor-demo01-pm9iio

Install

# NPM
npm install fa-cron-react-editor

# Yarn
yarn add fa-cron-react-editor

Usage

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}
        />
    );
}

Demo

fa-cron-react-editor example

Getting Started

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

RoadMap

  1. Base cron editor
  2. Better style
  3. Locale customization
  4. Code Sandbox Demo
  5. Tool Website publish

About

a react cron quartz editor. cron表达式编辑器

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published