A panel of the item.
It must be used with the <Item />
component. If <Item />
contains the src
props, the item will display that image as overview.
import GGEditor, { Flow, Item, ItemPanel } from 'gg-editor';
<GGEditor>
<Flow />
<ItemPanel>
<Item
type="node"
size="72*72"
shape="flow-circle"
model={{
color: '#FA8C16',
label: 'Item 1',
}}
src="https://gw.alipayobjects.com/zos/rmsportal/ZnPxbVjKYADMYxkTQXRi.svg"
/>
</ItemPanel>
</GGEditor>
Property | Description | Type | Default |
---|---|---|---|
type | required The type of an item. Options: node , edge . |
string |
- |
size | required The size of an item. Format: 50*50 . |
string |
- |
shape | required The shape of an item. Built-in shapes: node, edge. | string |
- |
model | The initial model of an item. | object |
- |
src | The overview image source of an item. | string |
- |