Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.08 KB

itemPanel.en-US.md

File metadata and controls

39 lines (31 loc) · 1.08 KB

ItemPanel

A panel of the item.

Usage

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>

API

Item

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 -