sk-component

$ npm install sk-component --save

Usage no npm install needed!

<script type="module">
  import skComponent from 'https://cdn.skypack.dev/sk-component';
</script>

README

sk-component

📦 安装

$ npm install sk-component --save

🔨 示例

import React from 'react';
import { Relationship } from 'sk-component';

const nodes = [
  { id: 1, label: '节点1' },
  { id: 2, label: '节点2' },
  { id: 3, label: '节点3' },
  { id: 4, label: '节点4' },
];
const edges = [{ from: 1, to: 2 }, { from: 1, to: 3 }, { from: 1, to: 4 }];

export default () => <Relationship nodes={nodes} edges={edges}></Relationship>;

🔗 文档

具体组件文档