chore(markdown): Updated snippets docs for v3
This commit is contained in:
parent
15b6ed0419
commit
4b3ceb2995
10 changed files with 193 additions and 76 deletions
|
@ -6,10 +6,21 @@ The `snap-socket` snippet is used to mark the socket part of a snap button.
|
|||
|
||||
It is provided by [plugin-buttons](/reference/plugins/buttons/).
|
||||
|
||||
```js
|
||||
snippets.demo = new Snippet('snap-socket', points.anchor)
|
||||
```
|
||||
## Example
|
||||
|
||||
<Example part="snippets_snapsocket">
|
||||
An example of the snap-socket snippet
|
||||
<Example caption="An example of the snap-socket snippet">
|
||||
```js
|
||||
({ Point, Path, paths, Snippet, snippets, part }) => {
|
||||
|
||||
snippets.demo = new Snippet('snap-socket', new Point(0,0))
|
||||
|
||||
// Prevent clipping
|
||||
paths.diag = new Path()
|
||||
.move(new Point(-50,-4))
|
||||
.move(new Point(50,4))
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Example>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue