레퍼런스
Components
<DRAWEditor />
DRAWEditor 컴포넌트의 Props는 styled-system (opens in a new tab)을 사용합니다.
| Category | Props | Reference |
|---|---|---|
| Size | width, maxWidth, minWidth, height, maxHeight, minHeight | https://styled-system.com/api/#layout (opens in a new tab) |
| Margin | m(margin), mx(marginX), my(marginY), mt(marginTop), ml(marginLeft), mr(marginRight), mb(marginBottom) | https://styled-system.com/table#space (opens in a new tab) |
| Padding | p(padding), px(paddingX), py(paddingY), pt(paddingTop), pl(paddingLeft), pr(paddingRight), pb(paddingBottom) | https://styled-system.com/table#space (opens in a new tab) |
| Background | background, backgroundImage, backgroundPosition, backgroundRepeat, backgroundSize | https://styled-system.com/api/#background (opens in a new tab) |
Functions
initLibrary
라이브러리를 초기화하는 함수입니다. 반드시 <DRAWEditor /> 컴포넌트가 로드되기 전에 호출되어야 하며, WebAssembly 모듈에 대한 wasmPath를 지정해줘야 컴포넌트를 사용할 수 있습니다.
Parameters
- options:
InitLibraryOptions
Returns
void
Types
InitLibraryOptions
| Name | Type | Required | Defaults |
|---|---|---|---|
| wasmPath | string | Yes | "" |
| onWASMLoaded | () => void | () => {} |
DRAWEditorProps
확장한 타입
- BackgroundProps
- WidthProps
- MinWidthProps
- MaxWidthProps
- HeightProps
- MinHeightProps
- MaxHeightProps
- SpaceProps