Skip to content

Commit

Permalink
Updated documentation list
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed May 8, 2018
1 parent c5b5769 commit af533c2
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 95 deletions.
10 changes: 5 additions & 5 deletions docs/documentation/docs/controls/PropertyFieldNumber.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ This control generates an input field for numbers. Text is not allowed as this w

## How to use this control in your solutions

1. Check that you installed the `@pnp/spfx-property-controls` dependency. Check out The [getting started](../#getting-started) page for more information about installing the dependency.
2. Import the following modules to your component:
- Check that you installed the `@pnp/spfx-property-controls` dependency. Check out The [getting started](../#getting-started) page for more information about installing the dependency.
- Import the following modules to your component:

```TypeScript
import { PropertyFieldNumber } from '@pnp/spfx-property-controls/lib/PropertyFieldNumber';
```

3. Create a new property for your web part, for example:
- Create a new property for your web part, for example:

```TypeScript
export interface IPropertyControlsTestWebPartProps {
numberValue: number;
}
```

4. Add the custom property control to the `groupFields` of the web part property pane configuration:
- Add the custom property control to the `groupFields` of the web part property pane configuration:

```TypeScript
PropertyFieldNumber("numberValue", {
Expand All @@ -37,7 +37,7 @@ PropertyFieldNumber("numberValue", {
})
```

You can also implement your own validation with the `onGetErrorMessage` property as follows:
- You can also implement your own validation with the `onGetErrorMessage` property as follows:

```TypeScript
PropertyFieldNumber("numberValue", {
Expand Down
Loading

0 comments on commit af533c2

Please sign in to comment.