Package Exports
- @antv/x6-react-components
- @antv/x6-react-components/es/index.js
- @antv/x6-react-components/es/menu/style/index.css
- @antv/x6-react-components/es/toolbar/style/index.css
- @antv/x6-react-components/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@antv/x6-react-components) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
x6-react-components
React components for building x6 editors
Components
- Menu
- Dropdown
- ContextMenu
- Menubar
- Toolbar
- SplitBox
- ScrollBox
- AutoScrollBox
- ColorPicker
Installation
# npm
$ npm install @antv/x6-react-components --save
# yarn
$ yarn add @antv/x6-react-componentsUsage
Import component and style:
import { Menu } from '@antv/x6-react-components/es/menu'
// less
import '@antv/x6-react-components/es/menu/style'
// or css
import '@antv/x6-react-components/es/menu/style/index.css'We strongly recommend using babel-plugin-import, which can convert the following code to the '@antv/x6-react-components/es/xxx' way:
import { Menu } from '@antv/x6-react-components'And this plugin will also load corresponding styles too. Via .babelrc or babel-loader:
{
"plugins": [
[
"import",
{
"libraryName": "@antv/x6-react-components",
"libraryDirectory": "es", // es or lib
"style": true,
"transformToDefaultImport": true
}
]
]
}Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.