Skip to content

Commit 12a15be

Browse files
committed
Docs example only display placeholder in edit mode
1 parent 7bf34cb commit 12a15be

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/documentation/docs/controls/Placeholder.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,21 @@ Sample of using the `hideButton` functionality for hiding the button when page i
5656
theme={this.props.themeVariant} />
5757
```
5858

59+
Sample to only display `Placeholder` when the web part is in edit mode:
60+
61+
```TypeScript
62+
{
63+
this.displayMode === DisplayMode.Edit ?
64+
<Placeholder iconName='Edit'
65+
iconText='Configure your web part'
66+
description='Please configure the web part.'
67+
buttonLabel='Configure'
68+
onConfigure={this._onConfigure}
69+
theme={this.props.themeVariant} /> :
70+
<div />
71+
}
72+
```
73+
5974
## Implementation
6075

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

0 commit comments

Comments
 (0)