Skip to content

Commit

Permalink
Placeholder documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Dec 20, 2018
1 parent 96885fc commit 194adda
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions docs/documentation/docs/controls/Placeholder.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ import { Placeholder } from "@pnp/spfx-controls-react/lib/Placeholder";
- Use the `Placeholder` control in your code as follows:

```TypeScript
<Placeholder
iconName='Edit'
iconText='Configure your web part'
description='Please configure the web part.'
buttonLabel='Configure'
onConfigure={this._onConfigure} />
<Placeholder iconName='Edit'
iconText='Configure your web part'
description='Please configure the web part.'
buttonLabel='Configure'
onConfigure={this._onConfigure} />
```

- 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:
Expand All @@ -33,6 +32,17 @@ private _onConfigure() {
}
```

Sample of using the `hideButton` functionality for hiding the button when page is in read mode:

```TypeScript
<Placeholder iconName='Edit'
iconText='Configure your web part'
description='Please configure the web part.'
buttonLabel='Configure'
hideButton={this.props.displayMode === DisplayMode.Read}
onConfigure={this._onConfigure} />
```

## Implementation

The placeholder control can be configured with the following properties:
Expand Down

0 comments on commit 194adda

Please sign in to comment.