Skip to content

Commit 194adda

Browse files
committed
Placeholder documentation update
1 parent 96885fc commit 194adda

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

docs/documentation/docs/controls/Placeholder.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ import { Placeholder } from "@pnp/spfx-controls-react/lib/Placeholder";
1616
- Use the `Placeholder` control in your code as follows:
1717

1818
```TypeScript
19-
<Placeholder
20-
iconName='Edit'
21-
iconText='Configure your web part'
22-
description='Please configure the web part.'
23-
buttonLabel='Configure'
24-
onConfigure={this._onConfigure} />
19+
<Placeholder iconName='Edit'
20+
iconText='Configure your web part'
21+
description='Please configure the web part.'
22+
buttonLabel='Configure'
23+
onConfigure={this._onConfigure} />
2524
```
2625

2726
- With the `onConfigure` property you can define what it needs to do when you click on the button. Like for example opening the property pane:
@@ -33,6 +32,17 @@ private _onConfigure() {
3332
}
3433
```
3534

35+
Sample of using the `hideButton` functionality for hiding the button when page is in read mode:
36+
37+
```TypeScript
38+
<Placeholder iconName='Edit'
39+
iconText='Configure your web part'
40+
description='Please configure the web part.'
41+
buttonLabel='Configure'
42+
hideButton={this.props.displayMode === DisplayMode.Read}
43+
onConfigure={this._onConfigure} />
44+
```
45+
3646
## Implementation
3747

3848
The placeholder control can be configured with the following properties:

0 commit comments

Comments
 (0)