@xrhcc-flow/components
v1.0.0
Published
React components for building x6 editors
Downloads
8
Maintainers
Readme
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
}
]
]
}