1
0
Fork 0

chore(markdown): Updated snippets docs for v3

This commit is contained in:
Joost De Cock 2022-10-02 18:04:20 +02:00
parent 15b6ed0419
commit 4b3ceb2995
10 changed files with 193 additions and 76 deletions

View file

@ -5,11 +5,21 @@ title: snap-stud
The `snap-stud` snippet is used to mark the stud part of a snap button.
It is provided by [plugin-buttons](/reference/plugins/buttons/).
## Example
<Example caption="An example of the snap-stud snippet">
```js
snippets.demo = new Snippet('snap-stud', points.anchor)
```
({ Point, Path, paths, Snippet, snippets, part }) => {
<Example part="snippets_snapstud">
An example of the snap-stud snippet
snippets.demo = new Snippet('snap-stud', new Point(0,0))
// Prevent clipping
paths.diag = new Path()
.move(new Point(-50,-4))
.move(new Point(50,4))
return part
}
```
</Example>