Skip to content

Commit

Permalink
[DOC]: API Reference for DevSettings.addMenuItem() facebook#1523 (fac…
Browse files Browse the repository at this point in the history
…ebook#1539)

* started doc addMenuItem

* added API reference DevSettings

* Update DevSettings API reference

* Update docs/devsettings.md

Co-Authored-By: Ricky <rickhanlonii@gmail.com>

Co-authored-by: Ricky <rickhanlonii@gmail.com>
  • Loading branch information
2 people authored and espipj committed Feb 8, 2020
1 parent 4ca1138 commit 6562436
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/devsettings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
id: devsettings
title: DevSettings
---

The `DevSettings` module exposes methods for customizing settings for developers in development.

---

# Reference

## Methods

### `addMenuItem()`

```jsx
addMenuItem(title: string, handler: () => )
```

Add a custom menu item to the developer menu:

```jsx
DevSettings.addMenuItem('Show Secret Dev Screen', () => {
Alert.alert('Showing secret dev screen!');
});
```
1 change: 1 addition & 0 deletions website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
"backhandler",
"clipboard",
"datepickerandroid",
"devsettings",
"dimensions",
"easing",
"imageeditor",
Expand Down

0 comments on commit 6562436

Please sign in to comment.