From 689600a0e28334642e0ff575c22414863b5b443b Mon Sep 17 00:00:00 2001 From: Tim Wang Date: Thu, 5 Oct 2017 16:21:43 +0800 Subject: [PATCH] Use UnimplementedView for CheckBox on iOS --- .../CheckBox/{CheckBox.js => CheckBox.android.js} | 2 +- Libraries/Components/CheckBox/CheckBox.ios.js | 15 +++++++++++++++ website/server/docsList.js | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) rename Libraries/Components/CheckBox/{CheckBox.js => CheckBox.android.js} (98%) create mode 100644 Libraries/Components/CheckBox/CheckBox.ios.js diff --git a/Libraries/Components/CheckBox/CheckBox.js b/Libraries/Components/CheckBox/CheckBox.android.js similarity index 98% rename from Libraries/Components/CheckBox/CheckBox.js rename to Libraries/Components/CheckBox/CheckBox.android.js index 183cbafa9b4372..bd69b0bed74727 100644 --- a/Libraries/Components/CheckBox/CheckBox.js +++ b/Libraries/Components/CheckBox/CheckBox.android.js @@ -27,7 +27,7 @@ type DefaultProps = { }; /** - * Renders a boolean input. + * Renders a boolean input (Android only). * * This is a controlled component that requires an `onValueChange` callback that * updates the `value` prop in order for the component to reflect user actions. diff --git a/Libraries/Components/CheckBox/CheckBox.ios.js b/Libraries/Components/CheckBox/CheckBox.ios.js new file mode 100644 index 00000000000000..02124a885a6477 --- /dev/null +++ b/Libraries/Components/CheckBox/CheckBox.ios.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2017-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CheckBox + * @flow + * @format + */ +'use strict'; + +module.exports = require('UnimplementedView'); diff --git a/website/server/docsList.js b/website/server/docsList.js index 38dfab29b444b6..5f714b8548072d 100644 --- a/website/server/docsList.js +++ b/website/server/docsList.js @@ -12,7 +12,7 @@ const components = [ '../Libraries/Components/ActivityIndicator/ActivityIndicator.js', '../Libraries/Components/Button.js', - '../Libraries/Components/CheckBox/CheckBox.js', + '../Libraries/Components/CheckBox/CheckBox.android.js', '../Libraries/Components/DatePicker/DatePickerIOS.ios.js', '../Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js', '../Libraries/Lists/FlatList.js',