1
0
Fork 0

fix(markdown): Restructure part reference. See #2981

This commit is contained in:
Joost De Cock 2022-10-18 21:00:50 +02:00
parent b4eb7e7b00
commit ac7b5befce
10 changed files with 105 additions and 110 deletions

View file

@ -0,0 +1,32 @@
---
title: Part.setHidden()
---
The `Part.setHidden()` method will mark the part either hidden
or not, depending on the value you pass it.
This method returns the `part` object, so it's chainable
- Pass a *truthy* value: The part will be hidden
- Pass a *falsy* value: The part will be unhidden/revealed
<Tip>
This method can be destructured as `setHidden`
in [a part's draft method](/reference/api/part/draft).
</Tip>
<Related>
The [hide](/reference/api/part/hide) and
[unhide](/reference/api/part/unhide) also control a
part's visibility
</Related>
## Part.setHidden() example
```js
cont part = {
name: 'examples.hide',
draft: ({ setHidden, part }) => part.setHidden(true)
}
```