1
0
Fork 0
freesewing/markdown/dev/reference/api/part/props/en.md

30 lines
569 B
Markdown
Raw Normal View History

2023-04-12 13:52:36 +00:00
---
title: Part.asProps()
---
This `Part.asProps()` method can be used to return the part as an object that is suitable for inclusion in renderprops.
## Example
<Example caption=" Example of the Part.asprops() method">
```js
({ Point, points, Path, paths, part }) => {
Part.prototype.asProps = function ()
return {
paths: this.paths,
points: this.points,
snippets: this.snippets,
attributes: this.attributes,
height: this.height,
width: this.width,
bottomRight: this.bottomRight,
topLeft: this.topLeft,
}
}
```
</Example>