polestar-ui-kit
Version:
## Install
53 lines (37 loc) • 2.43 kB
Markdown
## Button
- [Ant Design - Button](https://3x.ant.design/components/button/)
### Component
```js
import React from 'react';
import { Button } from 'polestar-ui-kit';
class MyComponent extends React.Component {
render() {
return (
<Button>Button Example</Button>
);
}
}
export default MyComponent;
```
### Props
| Name | Type | Default | Description |
| --------------- | --------------------- | ------------ | ------------------------------- |
| className | string | - | css class 설정 |
| diagramId | string | - | diagram id 설정 (필수) |
| diagram | function() | - | |
| model | object|function() | - | |
| nodeTemplate | object|function() | - | 노드 템플릿 |
| nodeTemplateMaps | object|function() | - | category로 지정한 노드 템플릿<br>nodeTemplateMaps 데이터 구조: <br>{ category: '', categoryTemplate: $make() } |
| linkTemplate | object|function() | - | 링크 템플릿 |
| linkTemplateMaps | object|function() | - | category로 지정한 링크 템플릿<br>linkTemplateMaps 데이터 구조: <br>{ category: '', categoryTemplate: $make() } |
| groupTemplate | object|function() | - | 그룹 템플릿 |
### Methods
| Name | Parameters | Return | Description |
| ----------------- | ------------------------ | -------------- | ----------- |
| getDiagram() | - | gojs diagram | |
| getWidth() | - | Number | |
| setModel(model) | model : gojs model | void | |
| clear() | - | void | |
| addNode(nodeData, node) | (nodeData, node) => {} | | |
| wewt | ✔ | | |
### Static