diff --git a/.circleci/config.yml b/.circleci/config.yml index ac3cbfaa9a0..72eb3d770ab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,7 +64,7 @@ jobs: - run: name: Check for missing index.html (build errors) command: | - if [ ! -f build/react-native/index.html ]; then + if [ ! -f build/index.html ]; then exit 1; fi # -------------------------------------------------- diff --git a/.gitignore b/.gitignore index 5d4acae64f8..e4401005a3f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,6 @@ website/i18n/* !website/i18n/en.json .nvmrc +.docusaurus website/scripts/sync-api-docs/generatedComponentApiDocs.js website/scripts/sync-api-docs/extracted.json diff --git a/docs/activityindicator.md b/docs/activityindicator.md index 3f7ac179ab0..12f43f8fc3f 100644 --- a/docs/activityindicator.md +++ b/docs/activityindicator.md @@ -106,9 +106,9 @@ Whether to show the indicator (`true`) or hide it (`false`). The foreground color of the spinner. -| Type | Default | -| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [color](colors) | `null` (system accent default color)
Android

`'#999999'`
iOS
| +| Type | Default | +| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [color](colors) | `null` (system accent default color)
Android

`'#999999'`
iOS
| --- diff --git a/docs/alertios.md b/docs/alertios.md index 3113eacacc9..e338397bbd6 100644 --- a/docs/alertios.md +++ b/docs/alertios.md @@ -1,6 +1,6 @@ --- id: alertios -title: 🚧 AlertIOS +title: '🚧 AlertIOS' --- > **Deprecated.** Use [`Alert`](alert) instead. diff --git a/docs/appearance.md b/docs/appearance.md index e55ed2575bb..fc8db3e8a84 100644 --- a/docs/appearance.md +++ b/docs/appearance.md @@ -59,17 +59,13 @@ Indicates the current user preferred color scheme. The value may be updated late Supported color schemes: -| Value | Description | -| --------- | --------------------------------------------------- | -| `"light"` | The user prefers a light color theme. | -| `"dark"` | The user prefers a dark color theme. | -| `null` | The user has not indicated a preferred color theme. | +- `light`: The user prefers a light color theme. +- `dark`: The user prefers a dark color theme. +- null: The user has not indicated a preferred color theme. -> **Note:** `getColorScheme()` will always return `"light"` when debugging with browser. +See also: `useColorScheme` hook. -See also: [`useColorScheme`](usecolorscheme) hook. - ---- +> Note: `getColorScheme()` will always return `light` when debugging with Chrome. ### `addChangeListener()` @@ -79,8 +75,6 @@ static addChangeListener(listener) Add an event handler that is fired when appearance preferences change. ---- - ### `removeChangeListener()` ```jsx diff --git a/docs/appregistry.md b/docs/appregistry.md index 5a7c9527078..f8520bc7d13 100644 --- a/docs/appregistry.md +++ b/docs/appregistry.md @@ -34,20 +34,17 @@ To "stop" an application when a view should be destroyed, call `AppRegistry.unmo ## Methods -### `cancelHeadlessTask()` +### `setWrapperComponentProvider()` ```jsx -static cancelHeadlessTask(taskId, taskKey) +static setWrapperComponentProvider(provider) ``` -Only called from native code. Cancels a headless task. - **Parameters:** -| Name | Type | Required | -| ---------------------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------- | -| taskId
Required
| number | The native id for this task instance that was used when `startHeadlessTask` was called. | -| taskKey
Required
| string | The key for the task that was used when `startHeadlessTask` was called. | +| Name | Type | Required | +| -------- | ----------------- | -------- | +| provider | ComponentProvider | yes | --- @@ -59,179 +56,133 @@ static enableArchitectureIndicator(enabled) **Parameters:** -| Name | Type | -| -------------------------------------------------------- | ------- | -| enabled
Required
| boolean | +| Name | Type | Required | +| ------- | ------- | -------- | +| enabled | boolean | yes | --- -### `getAppKeys()` +### `registerConfig()` ```jsx -static getAppKeys() +static registerConfig([config]) ``` -Returns an array of strings. - ---- +**Parameters:** -### `getRegistry()` +| Name | Type | Required | Description | +| ------ | --------- | -------- | ----------- | +| config | AppConfig | yes | See below. | -```jsx -static getRegistry() -``` +Valid `AppConfig` keys are: -Returns a [Registry](appregistry#registry) object. +- 'appKey' (string)- Required. +- 'component' (ComponentProvider) - Optional. +- 'run' (Function) - Optional. +- 'section' (boolean) - Optional. --- -### `getRunnable()` +### `registerComponent()` ```jsx -static getRunnable(appKey) +static registerComponent(appKey, componentProvider, section?) ``` -Returns a [Runnable](appregistry#runnable) object. - **Parameters:** -| Name | Type | -| ------------------------------------------------------- | ------ | -| appKey
Required
| string | - ---- - -### `getSectionKeys()` - -```jsx -static getSectionKeys() -``` - -Returns an array of strings. +| Name | Type | Required | +| ----------------- | ----------------- | -------- | +| appKey | string | yes | +| componentProvider | ComponentProvider | yes | +| section | boolean | no | --- -### `getSections()` - -```jsx -static getSections() -``` - -Returns a [Runnables](appregistry#runnables) object. - ---- - -### `registerCancellableHeadlessTask()` +### `registerRunnable()` ```jsx -static registerCancellableHeadlessTask(taskKey, taskProvider, taskCancelProvider) +static registerRunnable(appKey, run) ``` -Register a headless task which can be cancelled. A headless task is a bit of code that runs without a UI. - **Parameters:** -| Name | Type | Description | -| --------------------------------------------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| taskKey
Required
| string | The native id for this task instance that was used when startHeadlessTask was called. | -| taskProvider
Required
| [TaskProvider](appregistry#taskprovider) | A promise returning function that takes some data passed from the native side as the only argument. When the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context. | -| taskCancelProvider
Required
| [TaskCancelProvider](appregistry#taskcancelprovider) | a void returning function that takes no arguments; when a cancellation is requested, the function being executed by taskProvider should wrap up and return ASAP. | +| Name | Type | Required | +| ------ | -------- | -------- | +| appKey | string | yes | +| run | Function | yes | --- -### `registerComponent()` +### `registerSection()` ```jsx -static registerComponent(appKey, componentProvider, section?) +static registerSection(appKey, component) ``` **Parameters:** -| Name | Type | -| ------------------------------------------------------------------ | ----------------- | -| appKey
Required
| string | -| componentProvider
Required
| ComponentProvider | -| section | boolean | +| Name | Type | Required | +| --------- | ----------------- | -------- | +| appKey | string | yes | +| component | ComponentProvider | yes | --- -### `registerConfig()` +### `getAppKeys()` ```jsx -static registerConfig(config) +static getAppKeys() ``` -**Parameters:** - -| Name | Type | -| ------------------------------------------------------- | ---------------------------------- | -| config
Required
| [AppConfig](appregistry#appconfig) | - ---- +Returns an Array of AppKeys -### `registerHeadlessTask()` +### `getSectionKeys()` ```jsx -static registerHeadlessTask(taskKey, taskProvider) +static getSectionKeys() ``` -Register a headless task. A headless task is a bit of code that runs without a UI. - -This is a way to run tasks in JavaScript while your app is in the background. It can be used, for example, to sync fresh data, handle push notifications, or play music. - -**Parameters:** - -| Name | Type | Description | -| --------------------------------------------------------------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| taskKey
Required
| string | The native id for this task instance that was used when startHeadlessTask was called. | -| taskProvider
Required
| [TaskProvider](appregistry#taskprovider) | A promise returning function that takes some data passed from the native side as the only argument. When the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context. | +Returns an Array of SectionKeys --- -### `registerRunnable()` +### `getSections()` ```jsx -static registerRunnable(appKey, run) +static getSections() ``` -**Parameters:** +Returns all Runnables which is an object with key of `AppKeys` and value of type of `Runnable` which consist of: -| Name | Type | -| ------------------------------------------------------- | -------- | -| appKey
Required
| string | -| run
Required
| function | +- 'component' (ComponentProvider). +- 'run' (Function). --- -### `registerSection()` +### `getRunnable()` ```jsx -static registerSection(appKey, component) +static getRunnable(appKey) ``` -**Parameters:** +Returns a `Runnable` object which consist of: -| Name | Type | -| ---------------------------------------------------------- | ----------------- | -| appKey
Required
| string | -| component
Required
| ComponentProvider | +- 'component' (ComponentProvider). +- 'run' (Function). --- -### `runApplication()` +### `getRegistry()` ```jsx -static runApplication(appKey, appParameters) +static getRegistry() ``` -Loads the JavaScript bundle and runs the app. - -**Parameters:** +Returns a type `Registry` which consist of: -| Name | Type | -| -------------------------------------------------------------- | ------ | -| appKey
Required
| string | -| appParameters
Required
| any | +- 'sections' (Array of strings). +- 'runnables' (Runnables). --- @@ -243,50 +194,33 @@ static setComponentProviderInstrumentationHook(hook) **Parameters:** -| Name | Type | -| ----------------------------------------------------- | -------- | -| hook
Required
| function | - -A valid `hook` function accepts the following as arguments: - -| Name | Type | -| ------------------------------------------------------------------------ | ------------------ | -| component
Required
| ComponentProvider | -| scopedPerformanceLogger
Required
| IPerformanceLogger | - -The function must also return a React Component. - ---- - -### `setWrapperComponentProvider()` +| Name | Type | Required | Description | +| ---- | -------- | -------- | ----------- | +| hook | Function | yes | See below. | -```jsx -static setWrapperComponentProvider(provider) -``` +A valid `hook` accepts the following as arguments: -**Parameters:** +- 'component' (ComponentProvider)- Required. +- 'scopedPerformanceLogger' (IPerformanceLogger)- Required. -| Name | Type | -| --------------------------------------------------------- | ----------------- | -| provider
Required
| ComponentProvider | +The `hook` function returns a React Component --- -### `startHeadlessTask()` +### `runApplication()` ```jsx -static startHeadlessTask(taskId, taskKey, data) +static runApplication(appKey, appParameters) ``` -Only called from native code. Starts a headless task. +Loads the JavaScript bundle and runs the app. **Parameters:** -| Name | Type | Description | -| -------------------------------------------------------- | ------ | -------------------------------------------------------------------- | -| taskId
Required
| number | The native id for this task instance to keep track of its execution. | -| taskKey
Required
| string | The key for the task to start. | -| data
Required
| any | The data to pass to the task. | +| Name | Type | Required | +| ------------- | ------ | -------- | +| appKey | string | yes | +| appParameters | any | yes | --- @@ -300,93 +234,90 @@ Stops an application when a view should be destroyed. **Parameters:** -| Name | Type | -| -------------------------------------------------------- | ------ | -| rootTag
Required
| number | - -## Type Definitions +| Name | Type | Required | +| ------- | ------ | -------- | +| rootTag | number | yes | -### AppConfig +--- -Application configuration for the `registerConfig` method. +### `registerHeadlessTask()` -| Type | -| ------ | -| object | +```jsx +static registerHeadlessTask(taskKey, taskProvider) +``` -**Properties:** +Register a headless task. A headless task is a bit of code that runs without a UI. @param taskKey the key associated with this task @param taskProvider a promise returning function that takes some data passed from the native side as the only argument; when the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context. -| Name | Type | -| ------------------------------------------------------- | ----------------- | -| appKey
Required
| string | -| component | ComponentProvider | -| run | function | -| section | boolean | +This is a way to run tasks in JavaScript while your app is in the background. It can be used, for example, to sync fresh data, handle push notifications, or play music. -> **Note:** Every config is expected to set either `component` or `run` function. +**Parameters:** -### Registry +| Name | Type | Required | Description | +| ------------ | ------------ | -------- | ----------- | +| taskKey | String | yes | See below. | +| taskProvider | TaskProvider | yes | See below. | -| Type | -| ------ | -| object | +- A valid `TaskProvider` is a function that returns a `Task`. +- A `Task` is a function that accepts any data as argument and returns a Promise that resolves to undefined. -**Properties:** +--- -| Name | Type | -| --------- | ------------------------------------------ | -| runnables | array of [Runnables](appregistry#runnable) | -| sections | array of strings | +### `registerCancellableHeadlessTask()` -### Runnable +```jsx +static registerCancellableHeadlessTask(taskKey, taskProvider, taskCancelProvider) +``` -| Type | -| ------ | -| object | +Register a headless task which can be cancelled. A headless task is a bit of code that runs without a UI. @param taskKey the key associated with this task @param taskProvider a promise returning function that takes some data passed from the native side as the only argument; when the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context. @param taskCancelProvider a void returning function that takes no arguments; when a cancellation is requested, the function being executed by taskProvider should wrap up and return ASAP. -**Properties:** +**Parameters:** -| Name | Type | -| --------- | ----------------- | -| component | ComponentProvider | -| run | function | +| Name | Type | Required | Description | +| ------------------ | ------------------ | -------- | ----------- | +| taskKey | String | yes | See below. | +| taskProvider | TaskProvider | yes | See below. | +| taskCancelProvider | TaskCancelProvider | yes | See below. | -### Runnables +- A valid `TaskProvider` is a function that returns a `Task`. +- A `Task` is a function that accepts any data as argument and returns a Promise that resolves to undefined. +- A valid `TaskCancelProvider` is a function that returns a `TaskCanceller`. +- A `TaskCanceller` is a function that accepts no argument and returns void. -An object with key of `appKey` and value of type of [`Runnable`](appregistry#runnable). +--- -| Type | -| ------ | -| object | +### `startHeadlessTask()` -### Task +```jsx +static startHeadlessTask(taskId, taskKey, data) +``` -A `Task` is a function that accepts any data as argument and returns a Promise that resolves to `undefined`. +Only called from native code. Starts a headless task. -| Type | -| -------- | -| function | +@param taskId the native id for this task instance to keep track of its execution @param taskKey the key for the task to start @param data the data to pass to the task -### TaskCanceller +**Parameters:** -A `TaskCanceller` is a function that accepts no argument and returns void. +| Name | Type | Required | +| ------- | ------ | -------- | +| taskId | number | yes | +| taskKey | string | yes | +| data | any | yes | -| Type | -| -------- | -| function | +--- -### TaskCancelProvider +### `cancelHeadlessTask()` -A valid `TaskCancelProvider` is a function that returns a [`TaskCanceller`](appregistry#taskcanceller). +```jsx +static cancelHeadlessTask(taskId, taskKey) +``` -| Type | -| -------- | -| function | +Only called from native code. Cancels a headless task. -### TaskProvider +@param taskId the native id for this task instance that was used when startHeadlessTask was called @param taskKey the key for the task that was used when startHeadlessTask was called -A valid `TaskProvider` is a function that returns a [`Task`](appregistry#task). +**Parameters:** -| Type | -| -------- | -| function | +| Name | Type | Required | +| ------- | ------ | -------- | +| taskId | number | yes | +| taskKey | string | yes | diff --git a/docs/asyncstorage.md b/docs/asyncstorage.md index 3787b3fe4a7..de22a63c7af 100644 --- a/docs/asyncstorage.md +++ b/docs/asyncstorage.md @@ -1,6 +1,6 @@ --- id: asyncstorage -title: 🚧 AsyncStorage +title: '🚧 AsyncStorage' --- > **Deprecated.** Use [@react-native-community/async-storage](https://github.com/react-native-community/react-native-async-storage) instead. @@ -189,9 +189,9 @@ Gets _all_ keys known to your app; for all callers, libraries, etc. Returns a `P **Parameters:** -| Name | Type | Required | Description | -| -------- | ---------------------------------------------- | -------- | --------------------------------------------------------------- | -| callback | ?(error: ?Error, keys: ?Array) => void | No | Function that will be called with all keys found and any error. | +| Name | Type | Required | Description | +| -------- | ------------------------------------------------ | -------- | --------------------------------------------------------------- | +| callback | `?(error: ?Error, keys: ?Array`) => void | No | Function that will be called with all keys found and any error. | --- @@ -221,10 +221,10 @@ The method returns a `Promise` object. **Parameters:** -| Name | Type | Required | Description | -| -------- | --------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- | -| keys | Array | Yes | Array of key for the items to get. | -| callback | ?(errors: ?Array, result: ?Array>) => void | No | Function that will be called with a key-value array of the results, plus an array of any key-specific errors found. | +| Name | Type | Required | Description | +| -------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- | +| keys | `Array` | Yes | Array of key for the items to get. | +| callback | `?(errors: ?Array, result: ?Array>`) => void | No | Function that will be called with a key-value array of the results, plus an array of any key-specific errors found. | Example: @@ -258,10 +258,10 @@ The method returns a `Promise` object. **Parameters:** -| Name | Type | Required | Description | -| ------------- | -------------------------------- | -------- | ---------------------------------------------------------------------------- | -| keyValuePairs | Array> | Yes | Array of key-value array for the items to set. | -| callback | ?(errors: ?Array) => void | No | Function that will be called with an array of any key-specific errors found. | +| Name | Type | Required | Description | +| ------------- | ---------------------------------- | -------- | ---------------------------------------------------------------------------- | +| keyValuePairs | `Array>` | Yes | Array of key-value array for the items to set. | +| callback | `?(errors: ?Array) => void` | No | Function that will be called with an array of any key-specific errors found. | --- @@ -275,10 +275,10 @@ Call this to batch the deletion of all keys in the `keys` array. Returns a `Prom **Parameters:** -| Name | Type | Required | Description | -| -------- | -------------------------------- | -------- | ----------------------------------------------------------------------- | -| keys | Array | Yes | Array of key for the items to delete. | -| callback | ?(errors: ?Array) => void | No | Function that will be called an array of any key-specific errors found. | +| Name | Type | Required | Description | +| -------- | ---------------------------------- | -------- | ----------------------------------------------------------------------- | +| keys | `Array` | Yes | Array of key for the items to delete. | +| callback | `?(errors: ?Array) => void` | No | Function that will be called an array of any key-specific errors found. | Example: @@ -304,10 +304,10 @@ Batch operation to merge in existing and new values for a given set of keys. Thi **Parameters:** -| Name | Type | Required | Description | -| ------------- | -------------------------------- | -------- | ---------------------------------------------------------------------------- | -| keyValuePairs | Array> | Yes | Array of key-value array for the items to merge. | -| callback | ?(errors: ?Array) => void | No | Function that will be called with an array of any key-specific errors found. | +| Name | Type | Required | Description | +| ------------- | ---------------------------------- | -------- | ---------------------------------------------------------------------------- | +| keyValuePairs | `Array>` | Yes | Array of key-value array for the items to merge. | +| callback | `?(errors: ?Array) => void` | No | Function that will be called with an array of any key-specific errors found. | Example: diff --git a/docs/building-for-tv.md b/docs/building-for-tv.md index a2337e7704b..f7a8b19d672 100644 --- a/docs/building-for-tv.md +++ b/docs/building-for-tv.md @@ -5,18 +5,18 @@ title: Building For TV Devices TV devices support has been implemented with the intention of making existing React Native applications work on Apple TV and Android TV, with few or no changes needed in the JavaScript code for the applications. -
+
    - -
- + > **Deprecated.** Use [react-native-tvos](https://github.com/react-native-community/react-native-tvos) instead. For the details please check the [0.62 release blog post](https://reactnative.dev/blog/#moving-apple-tv-to-react-native-tvos). @@ -39,7 +39,7 @@ var running_on_tv = Platform.isTV; var running_on_apple_tv = Platform.isTVOS; ``` - + ## Build changes @@ -68,11 +68,11 @@ var Platform = require('Platform'); var running_on_android_tv = Platform.isTV; ``` - + ## Code changes - + - _General support for tvOS_: Apple TV specific changes in native code are all wrapped by the TARGET_OS_TV define. These include changes to suppress APIs that are not supported on tvOS (e.g. web views, sliders, switches, status bar, etc.), and changes to support user input from the TV remote or keyboard. @@ -84,7 +84,7 @@ var running_on_android_tv = Platform.isTV; - `onBlur` will be executed when the touchable view goes out of focus - `onPress` will be executed when the touchable view is actually selected by pressing the "select" button on the TV remote. - + - _Access to touchable controls_: When running on Android TV the Android framework will automatically apply a directional navigation scheme based on relative position of focusable elements in your views. The `Touchable` mixin has code added to detect focus changes and use existing methods to style the components properly and initiate the proper actions when the view is selected using the TV remote, so `TouchableWithoutFeedback`, `TouchableHighlight`, `TouchableOpacity` and `TouchableNativeFeedback` will work as expected. In particular: @@ -92,15 +92,15 @@ var running_on_android_tv = Platform.isTV; - `onBlur` will be executed when the touchable view goes out of focus - `onPress` will be executed when the touchable view is actually selected by pressing the "select" button on the TV remote. - + - _TV remote/keyboard input_: A new native class, `RCTTVRemoteHandler`, sets up gesture recognizers for TV remote events. When TV remote events occur, this class fires notifications that are picked up by `RCTTVNavigationEventEmitter` (a subclass of `RCTEventEmitter`), that fires a JS event. This event will be picked up by instances of the `TVEventHandler` JavaScript object. Application code that needs to implement custom handling of TV remote events can create an instance of `TVEventHandler` and listen for these events, as in the following code: - + - _TV remote/keyboard input_: A new native class, `ReactAndroidTVRootViewHelper`, sets up key events handlers for TV remote events. When TV remote events occur, this class fires a JS event. This event will be picked up by instances of the `TVEventHandler` JavaScript object. Application code that needs to implement custom handling of TV remote events can create an instance of `TVEventHandler` and listen for these events, as in the following code: - + ```jsx var TVEventHandler = require('TVEventHandler'); @@ -141,7 +141,7 @@ class Game2048 extends React.Component { } ``` - + - _Dev Menu support_: On the simulator, cmd-D will bring up the developer menu, similar to iOS. To bring it up on a real Apple TV device, make a long press on the play/pause button on the remote. (Please do not shake the Apple TV device, that will not work :) ) @@ -149,10 +149,20 @@ class Game2048 extends React.Component { - _Back navigation with the TV remote menu button_: The `BackHandler` component, originally written to support the Android back button, now also supports back navigation on the Apple TV using the menu button on the TV remote. - +- _TabBarIOS behavior_: The `TabBarIOS` component wraps the native `UITabBar` API, which works differently on Apple TV. To avoid jittery re-rendering of the tab bar in tvOS (see [this issue](https://github.com/facebook/react-native/issues/15081)), the selected tab bar item can only be set from Javascript on initial render, and is controlled after that by the user through native code. + + - _Dev Menu support_: On the simulator, cmd-M will bring up the developer menu, similar to Android. To bring it up on a real Android TV device, press the menu button or long press the fast-forward button on the remote. (Please do not shake the Android TV device, that will not work :) ) + + +- _Known issues_: + + - [ListView scrolling](https://github.com/facebook/react-native/issues/12793). The issue can be worked around by setting `removeClippedSubviews` to false in ListView and similar components. For more discussion of this issue, see [this PR](https://github.com/facebook/react-native/pull/12944). + + + - _Known issues_: - - `TextInput` components do not work for now (i.e. they cannot receive focus, see [this comment](https://github.com/facebook/react-native/pull/16500#issuecomment-629285638)). + - `InputText` components do not work for now (i.e. they cannot receive focus). diff --git a/docs/button.md b/docs/button.md index feefb4786ba..f1e02a4fea3 100644 --- a/docs/button.md +++ b/docs/button.md @@ -142,9 +142,11 @@ Text to display for blindness accessibility features. Color of the text (iOS), or background color of the button (Android). -| Type | Default | -| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [color](colors) | `'#2196F3'`
Android

`'#007AFF'`
iOS
| +| Type | Default | +| --------------- | ------------------------------------------------------------- | +| [color](colors) | | + +`'#2196F3'`
Android

`'#007AFF'`
iOS
| --- diff --git a/docs/checkbox.md b/docs/checkbox.md index cf04dba0179..7e4472f324e 100644 --- a/docs/checkbox.md +++ b/docs/checkbox.md @@ -1,6 +1,6 @@ --- id: checkbox -title: 🚧 CheckBox +title: '🚧 CheckBox' --- > **Deprecated.** Use [@react-native-community/checkbox](https://github.com/react-native-community/react-native-checkbox) instead. diff --git a/docs/clipboard.md b/docs/clipboard.md index 34b82b937b9..065ea3c9e62 100644 --- a/docs/clipboard.md +++ b/docs/clipboard.md @@ -1,6 +1,6 @@ --- id: clipboard -title: 🚧 Clipboard +title: '🚧 Clipboard' --- > **Deprecated.** Use [@react-native-community/clipboard](https://github.com/react-native-community/clipboard) instead. diff --git a/docs/colors.md b/docs/colors.md index 3677cbc903c..e81be3d6724 100644 --- a/docs/colors.md +++ b/docs/colors.md @@ -59,148 +59,148 @@ Named colors implementation follows the [CSS3/SVG specification](https://www.w3. -- aliceblue (`#f0f8ff`) -- antiquewhite (`#faebd7`) -- aqua (`#00ffff`) -- aquamarine (`#7fffd4`) -- azure (`#f0ffff`) -- beige (`#f5f5dc`) -- bisque (`#ffe4c4`) -- black (`#000000`) -- blanchedalmond (`#ffebcd`) -- blue (`#0000ff`) -- blueviolet (`#8a2be2`) -- brown (`#a52a2a`) -- burlywood (`#deb887`) -- cadetblue (`#5f9ea0`) -- chartreuse (`#7fff00`) -- chocolate (`#d2691e`) -- coral (`#ff7f50`) -- cornflowerblue (`#6495ed`) -- cornsilk (`#fff8dc`) -- crimson (`#dc143c`) -- cyan (`#00ffff`) -- darkblue (`#00008b`) -- darkcyan (`#008b8b`) -- darkgoldenrod (`#b8860b`) -- darkgray (`#a9a9a9`) -- darkgreen (`#006400`) -- darkgrey (`#a9a9a9`) -- darkkhaki (`#bdb76b`) -- darkmagenta (`#8b008b`) -- darkolivegreen (`#556b2f`) -- darkorange (`#ff8c00`) -- darkorchid (`#9932cc`) -- darkred (`#8b0000`) -- darksalmon (`#e9967a`) -- darkseagreen (`#8fbc8f`) -- darkslateblue (`#483d8b`) -- darkslategrey (`#2f4f4f`) -- darkturquoise (`#00ced1`) -- darkviolet (`#9400d3`) -- deeppink (`#ff1493`) -- deepskyblue (`#00bfff`) -- dimgray (`#696969`) -- dimgrey (`#696969`) -- dodgerblue (`#1e90ff`) -- firebrick (`#b22222`) -- floralwhite (`#fffaf0`) -- forestgreen (`#228b22`) -- fuchsia (`#ff00ff`) -- gainsboro (`#dcdcdc`) -- ghostwhite (`#f8f8ff`) -- gold (`#ffd700`) -- goldenrod (`#daa520`) -- gray (`#808080`) -- green (`#008000`) -- greenyellow (`#adff2f`) -- grey (`#808080`) -- honeydew (`#f0fff0`) -- hotpink (`#ff69b4`) -- indianred (`#cd5c5c`) -- indigo (`#4b0082`) -- ivory (`#fffff0`) -- khaki (`#f0e68c`) -- lavender (`#e6e6fa`) -- lavenderblush (`#fff0f5`) -- lawngreen (`#7cfc00`) -- lemonchiffon (`#fffacd`) -- lightblue (`#add8e6`) -- lightcoral (`#f08080`) -- lightcyan (`#e0ffff`) -- lightgoldenrodyellow (`#fafad2`) -- lightgray (`#d3d3d3`) -- lightgreen (`#90ee90`) -- lightgrey (`#d3d3d3`) -- lightpink (`#ffb6c1`) -- lightsalmon (`#ffa07a`) -- lightseagreen (`#20b2aa`) -- lightskyblue (`#87cefa`) -- lightslategrey (`#778899`) -- lightsteelblue (`#b0c4de`) -- lightyellow (`#ffffe0`) -- lime (`#00ff00`) -- limegreen (`#32cd32`) -- linen (`#faf0e6`) -- magenta (`#ff00ff`) -- maroon (`#800000`) -- mediumaquamarine (`#66cdaa`) -- mediumblue (`#0000cd`) -- mediumorchid (`#ba55d3`) -- mediumpurple (`#9370db`) -- mediumseagreen (`#3cb371`) -- mediumslateblue (`#7b68ee`) -- mediumspringgreen (`#00fa9a`) -- mediumturquoise (`#48d1cc`) -- mediumvioletred (`#c71585`) -- midnightblue (`#191970`) -- mintcream (`#f5fffa`) -- mistyrose (`#ffe4e1`) -- moccasin (`#ffe4b5`) -- navajowhite (`#ffdead`) -- navy (`#000080`) -- oldlace (`#fdf5e6`) -- olive (`#808000`) -- olivedrab (`#6b8e23`) -- orange (`#ffa500`) -- orangered (`#ff4500`) -- orchid (`#da70d6`) -- palegoldenrod (`#eee8aa`) -- palegreen (`#98fb98`) -- paleturquoise (`#afeeee`) -- palevioletred (`#db7093`) -- papayawhip (`#ffefd5`) -- peachpuff (`#ffdab9`) -- peru (`#cd853f`) -- pink (`#ffc0cb`) -- plum (`#dda0dd`) -- powderblue (`#b0e0e6`) -- purple (`#800080`) -- rebeccapurple (`#663399`) -- red (`#ff0000`) -- rosybrown (`#bc8f8f`) -- royalblue (`#4169e1`) -- saddlebrown (`#8b4513`) -- salmon (`#fa8072`) -- sandybrown (`#f4a460`) -- seagreen (`#2e8b57`) -- seashell (`#fff5ee`) -- sienna (`#a0522d`) -- silver (`#c0c0c0`) -- skyblue (`#87ceeb`) -- slateblue (`#6a5acd`) -- slategray (`#708090`) -- snow (`#fffafa`) -- springgreen (`#00ff7f`) -- steelblue (`#4682b4`) -- tan (`#d2b48c`) -- teal (`#008080`) -- thistle (`#d8bfd8`) -- tomato (`#ff6347`) -- turquoise (`#40e0d0`) -- violet (`#ee82ee`) -- wheat (`#f5deb3`) -- white (`#ffffff`) -- whitesmoke (`#f5f5f5`) -- yellow (`#ffff00`) -- yellowgreen (`#9acd32`) +- aliceblue (`#f0f8ff`) +- antiquewhite (`#faebd7`) +- aqua (`#00ffff`) +- aquamarine (`#7fffd4`) +- azure (`#f0ffff`) +- beige (`#f5f5dc`) +- bisque (`#ffe4c4`) +- black (`#000000`) +- blanchedalmond (`#ffebcd`) +- blue (`#0000ff`) +- blueviolet (`#8a2be2`) +- brown (`#a52a2a`) +- burlywood (`#deb887`) +- cadetblue (`#5f9ea0`) +- chartreuse (`#7fff00`) +- chocolate (`#d2691e`) +- coral (`#ff7f50`) +- cornflowerblue (`#6495ed`) +- cornsilk (`#fff8dc`) +- crimson (`#dc143c`) +- cyan (`#00ffff`) +- darkblue (`#00008b`) +- darkcyan (`#008b8b`) +- darkgoldenrod (`#b8860b`) +- darkgray (`#a9a9a9`) +- darkgreen (`#006400`) +- darkgrey (`#a9a9a9`) +- darkkhaki (`#bdb76b`) +- darkmagenta (`#8b008b`) +- darkolivegreen (`#556b2f`) +- darkorange (`#ff8c00`) +- darkorchid (`#9932cc`) +- darkred (`#8b0000`) +- darksalmon (`#e9967a`) +- darkseagreen (`#8fbc8f`) +- darkslateblue (`#483d8b`) +- darkslategrey (`#2f4f4f`) +- darkturquoise (`#00ced1`) +- darkviolet (`#9400d3`) +- deeppink (`#ff1493`) +- deepskyblue (`#00bfff`) +- dimgray (`#696969`) +- dimgrey (`#696969`) +- dodgerblue (`#1e90ff`) +- firebrick (`#b22222`) +- floralwhite (`#fffaf0`) +- forestgreen (`#228b22`) +- fuchsia (`#ff00ff`) +- gainsboro (`#dcdcdc`) +- ghostwhite (`#f8f8ff`) +- gold (`#ffd700`) +- goldenrod (`#daa520`) +- gray (`#808080`) +- green (`#008000`) +- greenyellow (`#adff2f`) +- grey (`#808080`) +- honeydew (`#f0fff0`) +- hotpink (`#ff69b4`) +- indianred (`#cd5c5c`) +- indigo (`#4b0082`) +- ivory (`#fffff0`) +- khaki (`#f0e68c`) +- lavender (`#e6e6fa`) +- lavenderblush (`#fff0f5`) +- lawngreen (`#7cfc00`) +- lemonchiffon (`#fffacd`) +- lightblue (`#add8e6`) +- lightcoral (`#f08080`) +- lightcyan (`#e0ffff`) +- lightgoldenrodyellow (`#fafad2`) +- lightgray (`#d3d3d3`) +- lightgreen (`#90ee90`) +- lightgrey (`#d3d3d3`) +- lightpink (`#ffb6c1`) +- lightsalmon (`#ffa07a`) +- lightseagreen (`#20b2aa`) +- lightskyblue (`#87cefa`) +- lightslategrey (`#778899`) +- lightsteelblue (`#b0c4de`) +- lightyellow (`#ffffe0`) +- lime (`#00ff00`) +- limegreen (`#32cd32`) +- linen (`#faf0e6`) +- magenta (`#ff00ff`) +- maroon (`#800000`) +- mediumaquamarine (`#66cdaa`) +- mediumblue (`#0000cd`) +- mediumorchid (`#ba55d3`) +- mediumpurple (`#9370db`) +- mediumseagreen (`#3cb371`) +- mediumslateblue (`#7b68ee`) +- mediumspringgreen (`#00fa9a`) +- mediumturquoise (`#48d1cc`) +- mediumvioletred (`#c71585`) +- midnightblue (`#191970`) +- mintcream (`#f5fffa`) +- mistyrose (`#ffe4e1`) +- moccasin (`#ffe4b5`) +- navajowhite (`#ffdead`) +- navy (`#000080`) +- oldlace (`#fdf5e6`) +- olive (`#808000`) +- olivedrab (`#6b8e23`) +- orange (`#ffa500`) +- orangered (`#ff4500`) +- orchid (`#da70d6`) +- palegoldenrod (`#eee8aa`) +- palegreen (`#98fb98`) +- paleturquoise (`#afeeee`) +- palevioletred (`#db7093`) +- papayawhip (`#ffefd5`) +- peachpuff (`#ffdab9`) +- peru (`#cd853f`) +- pink (`#ffc0cb`) +- plum (`#dda0dd`) +- powderblue (`#b0e0e6`) +- purple (`#800080`) +- rebeccapurple (`#663399`) +- red (`#ff0000`) +- rosybrown (`#bc8f8f`) +- royalblue (`#4169e1`) +- saddlebrown (`#8b4513`) +- salmon (`#fa8072`) +- sandybrown (`#f4a460`) +- seagreen (`#2e8b57`) +- seashell (`#fff5ee`) +- sienna (`#a0522d`) +- silver (`#c0c0c0`) +- skyblue (`#87ceeb`) +- slateblue (`#6a5acd`) +- slategray (`#708090`) +- snow (`#fffafa`) +- springgreen (`#00ff7f`) +- steelblue (`#4682b4`) +- tan (`#d2b48c`) +- teal (`#008080`) +- thistle (`#d8bfd8`) +- tomato (`#ff6347`) +- turquoise (`#40e0d0`) +- violet (`#ee82ee`) +- wheat (`#f5deb3`) +- white (`#ffffff`) +- whitesmoke (`#f5f5f5`) +- yellow (`#ffff00`) +- yellowgreen (`#9acd32`) diff --git a/docs/components-and-apis.md b/docs/components-and-apis.md index db70b2b94a7..a5162d4c569 100644 --- a/docs/components-and-apis.md +++ b/docs/components-and-apis.md @@ -18,38 +18,38 @@ You're not limited to the components and APIs bundled with React Native. React N Most apps will end up using one of these basic components. -
-
+
+ -
+ -
+ -
+ -
+ -
+

StyleSheet

Provides an abstraction layer similar to CSS stylesheets.

@@ -61,14 +61,14 @@ Most apps will end up using one of these basic components. These common user interface controls will render on any platform. -
-
+
+ -
+

Switch

Renders a boolean input.

@@ -80,14 +80,14 @@ These common user interface controls will render on any platform. Unlike the more generic [`ScrollView`](./scrollview), the following list view components only render elements that are currently showing on the screen. This makes them a performant choice for displaying long lists of data. -
-
+
+ -
+

SectionList

Like FlatList, but for sectioned lists.

@@ -99,39 +99,38 @@ Unlike the more generic [`ScrollView`](./scrollview), the following list view co Many of the following components provide wrappers for commonly used UIKit classes. -
-
+ - ## Android Components and APIs Many of the following components provide wrappers for commonly used Android classes. -
-
+
+
-

BackHandler

+

BackHandler

Detect hardware button presses for back navigation.

- +
-
+ -
+
-

PermissionsAndroid

+

PermissionsAndroid

Provides access to the permissions model introduced in Android M.

- +
-
+

ToastAndroid

Create an Android Toast alert.

@@ -143,66 +142,66 @@ Many of the following components provide wrappers for commonly used Android clas These components may be useful for certain applications. For an exhaustive list of components and APIs, check out the sidebar to the left (or menu above, if you are on a narrow screen). -
-
+
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ - -
+
diff --git a/docs/datepickerandroid.md b/docs/datepickerandroid.md index 899db97ca7b..0165d750212 100644 --- a/docs/datepickerandroid.md +++ b/docs/datepickerandroid.md @@ -1,6 +1,6 @@ --- id: datepickerandroid -title: 🚧 DatePickerAndroid +title: '🚧 DatePickerAndroid' --- > **Deprecated.** Use [@react-native-community/datetimepicker](https://github.com/react-native-community/react-native-datetimepicker) instead. diff --git a/docs/datepickerios.md b/docs/datepickerios.md index 6db2339a52d..67d4457b5ba 100644 --- a/docs/datepickerios.md +++ b/docs/datepickerios.md @@ -1,6 +1,6 @@ --- id: datepickerios -title: 🚧 DatePickerIOS +title: '🚧 DatePickerIOS' --- > **Deprecated.** Use [@react-native-community/datetimepicker](https://github.com/react-native-community/react-native-datetimepicker) instead. @@ -9,12 +9,12 @@ Use `DatePickerIOS` to render a date/time picker (selector) on iOS. This is a co ### Example -
-
    -