Mike Grabowski edf8888fb9 Platform.select method
Summary:
Kudos to frantic for this amazing idea! Works really well (yet so simple!)

Basically we had a discussion with vjeux and frantic and others in the PR #7033 how to handle platform-specific stylesheets in a similar to F8 app way.

There were quite a few nice ideas there, however that one seems to be the smallest yet the most powerful.

Basically there's a `Platform.select` method that given an object, will select a `obj[Platform.OS]` value.

It works with styles:
`Platform.select({ ios: {}, android: {} })`

with messages:
`<Text>{Platform.select({ ios: 'Check the App Store', android: 'Check Google Play' })}</Text>`

and also works well with components (similar to Wallmart idea of <PlatformSwitch />) - relevant example included in diff.
Closes https://github.com/facebook/react-native/pull/7220

Differential Revision: D3221709

Pulled By: vjeux

fb-gh-sync-id: 0a50071f2dcf2273198bc6e2c36e19bca97d7be9
fbshipit-source-id: 0a50071f2dcf2273198bc6e2c36e19bca97d7be9
2016-04-25 16:32:20 -07:00
..
2016-04-06 09:23:20 -07:00
2016-02-08 04:04:38 -08:00
2016-02-15 14:55:36 -08:00
2016-04-22 10:54:21 -07:00
2016-04-11 11:35:24 -07:00
2016-03-06 02:07:23 -08:00
2016-03-02 04:36:33 -08:00
2016-03-24 14:11:30 -07:00
2015-03-25 11:52:29 -07:00
2015-12-11 15:22:57 +01:00
2016-04-06 09:21:53 -07:00
2016-03-26 05:42:26 -07:00
2016-04-17 20:56:23 -07:00
2016-03-24 14:11:30 -07:00