Add example of getting window dimensions to Dimensions docs.

Summary:
This pull request adds an example to the Dimensions documentations.  Specifically, it gives an example of how to get the height and width from the window.

I'm submitting this documentation because discovering this information cost me some time and my hope is to save other folks time by having this info right in the docs generated from the comments in this file.

Let me know if you need anything else.
Closes https://github.com/facebook/react-native/pull/4211

Reviewed By: svcscm

Differential Revision: D2719953

Pulled By: androidtrunkagent

fb-gh-sync-id: 86d18e3847066211a013a50ce2f2a3e2032f5052
This commit is contained in:
Calvin Freitas 2015-12-22 04:57:45 -08:00 коммит произвёл facebook-github-bot-3
Родитель 699d748bb3
Коммит 7b62dc22ad
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -57,6 +57,8 @@ class Dimensions {
* than caching the value (for example, using inline styles rather than
* setting a value in a `StyleSheet`).
*
* Example: `var {height, width} = Dimensions.get('window');`
*
* @param {string} dim Name of dimension as defined when calling `set`.
* @returns {Object?} Value for the dimension.
*/