1.0.0 • Published 5 months ago

@xrhcc-flow/components v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

xrhcc-components

React components for building xrhcc-flow editors

Components

  • Menu
  • Dropdown
  • ContextMenu
  • Menubar
  • Toolbar
  • SplitBox
  • ScrollBox
  • AutoScrollBox
  • ColorPicker

Installation

# npm
$ npm install @xrhcc-flow/components --save

# yarn
$ yarn add @xrhcc-flow/components

Usage

Import component and style:

import { CodeMirror } from '@xrhcc-flow/components/es/menu'
// less
import '@xrhcc-flow/components/es/menu/style'
// or css
import '@xrhcc-flow/components/es/menu/style/index.css'

We strongly recommend using babel-plugin-import, which can convert the following code to the '@xrhcc-flow/components/es/xxx' way:

import { CodeMirror } from '@xrhcc-flow/components'

And this plugin will also load corresponding styles too. Via .babelrc or babel-loader:

{
  "plugins": [
    [
      "import",
      {
        "libraryName": "@xrhcc-flow/components",
        "libraryDirectory": "es", // es or lib
        "style": true,
        "transformToDefaultImport": true
      }
    ]
  ]
}