Migrate from View.propTypes.style to ViewPropTypes.style

parent 8b062c5b
......@@ -4,6 +4,7 @@ import {
StyleSheet,
SafeAreaView,
KeyboardAvoidingView,
ViewPropTypes,
} from 'react-native';
import PropTypes from 'prop-types';
import BackgroundImage from './background-image';
......@@ -33,7 +34,7 @@ Background.propTypes = {
image: PropTypes.string,
color: PropTypes.string,
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -67,7 +68,7 @@ SplitBackground.propTypes = {
color: PropTypes.string,
bottom: PropTypes.string,
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -96,7 +97,7 @@ export const ContentWrapper = ({ children, style }) => (
ContentWrapper.propTypes = {
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
export default Background;
......@@ -4,6 +4,7 @@ import {
TouchableOpacity,
Text as RNText,
StyleSheet,
ViewPropTypes,
} from 'react-native';
import PropTypes from 'prop-types';
import Text from './text';
......@@ -41,7 +42,7 @@ Button.propTypes = {
onPress: PropTypes.func.isRequired,
disabled: PropTypes.bool,
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -101,7 +102,7 @@ GlasButton.propTypes = {
onPress: PropTypes.func.isRequired,
disabled: PropTypes.bool,
children: PropTypes.string.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -119,7 +120,7 @@ export const SmallGlasButton = ({ style, ...props }) => (
);
SmallGlasButton.propTypes = {
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -155,7 +156,7 @@ PillButton.propTypes = {
onPress: PropTypes.func.isRequired,
disabled: PropTypes.bool,
children: PropTypes.string.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -230,7 +231,7 @@ SmallButton.propTypes = {
border: PropTypes.bool,
alert: PropTypes.string,
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -276,7 +277,7 @@ SmallPillButton.propTypes = {
text: PropTypes.string,
onPress: PropTypes.func.isRequired,
disabled: PropTypes.bool,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -292,7 +293,7 @@ export const BackButton = ({ onPress, disabled, style }) => (
BackButton.propTypes = {
onPress: PropTypes.func,
disabled: PropTypes.bool,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -308,7 +309,7 @@ export const CancelButton = ({ onPress, disabled, style }) => (
CancelButton.propTypes = {
onPress: PropTypes.func,
disabled: PropTypes.bool,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -324,7 +325,7 @@ export const AddButton = ({ onPress, disabled, style }) => (
AddButton.propTypes = {
onPress: PropTypes.func,
disabled: PropTypes.bool,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -358,7 +359,7 @@ export const QrButton = ({ onPress, disabled, style, children }) => (
QrButton.propTypes = {
onPress: PropTypes.func.isRequired,
disabled: PropTypes.bool,
style: View.propTypes.style,
style: ViewPropTypes.style,
children: PropTypes.string,
};
......@@ -391,7 +392,7 @@ export const DownButton = ({ onPress, disabled, style, children }) => (
DownButton.propTypes = {
onPress: PropTypes.func,
disabled: PropTypes.bool,
style: View.propTypes.style,
style: ViewPropTypes.style,
children: PropTypes.string,
};
......@@ -440,7 +441,7 @@ CopyButton.propTypes = {
onPress: PropTypes.func,
icon: PropTypes.node,
children: PropTypes.string,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -491,7 +492,7 @@ SmallCopyButton.propTypes = {
onPress: PropTypes.func,
icon: PropTypes.node,
children: PropTypes.string,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......
import React from 'react';
import { View } from 'react-native';
import { View, ViewPropTypes } from 'react-native';
import { createStyles, maxWidth } from '../component/media-query';
import PropTypes from 'prop-types';
import { color, breakWidth } from './style';
......@@ -42,7 +42,7 @@ const Card = ({ children, style }) => (
Card.propTypes = {
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
export default Card;
import React from 'react';
import { View, StyleSheet } from 'react-native';
import { View, StyleSheet, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
const styles = StyleSheet.create({
......@@ -15,7 +15,7 @@ const Container = ({ children, style }) => (
Container.propTypes = {
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
export default Container;
import React from 'react';
import { Text as RNText, StyleSheet, View } from 'react-native';
import { Text as RNText, StyleSheet, View, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
import { createStyles, maxWidth } from './media-query';
import Text from './text';
......@@ -96,7 +96,7 @@ export const NamedField = ({ name, children, style }) => (
NamedField.propTypes = {
name: PropTypes.string,
children: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -151,5 +151,5 @@ export const DetailField = ({ name, children, style }) => (
DetailField.propTypes = {
name: PropTypes.string,
children: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
style: View.propTypes.style,
style: ViewPropTypes.style,
};
import React from 'react';
import { View, Text as RNText, StyleSheet } from 'react-native';
import { View, Text as RNText, StyleSheet, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
import Text from './text';
import { color, font } from './style';
......@@ -25,7 +25,7 @@ export const FormStretcher = ({ children, style }) => (
FormStretcher.propTypes = {
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......
import React from 'react';
import { View, StyleSheet } from 'react-native';
import { View, StyleSheet, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
import { createStyles, maxWidth } from './media-query';
import Text from './text';
......@@ -60,7 +60,7 @@ export const Header = ({ style, children, color, shadow, separator }) => (
);
Header.propTypes = {
style: View.propTypes.style,
style: ViewPropTypes.style,
children: PropTypes.node,
color: PropTypes.string,
shadow: PropTypes.bool,
......
import React from 'react';
import { Image, View } from 'react-native';
import { Image, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
const Icon = ({ image, style }) => <Image source={image} style={style} />;
Icon.propTypes = {
image: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
export default Icon;
......@@ -3,6 +3,7 @@ import {
View,
StyleSheet,
ImageBackground as RNImageBackground,
ViewPropTypes,
} from 'react-native';
import PropTypes from 'prop-types';
......@@ -26,7 +27,7 @@ export const ImageBackground = ({ source, children, style }) => (
ImageBackground.propTypes = {
source: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -49,5 +50,5 @@ export const SvgBackground = ({ svg, children, style }) => (
SvgBackground.propTypes = {
svg: PropTypes.node,
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
import React from 'react';
import { View, Text as RNText, StyleSheet } from 'react-native';
import { View, Text as RNText, StyleSheet, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
import Text from './text';
import { font } from './style';
......@@ -31,7 +31,7 @@ export const BalanceLabel = ({ children, style }) => (
BalanceLabel.propTypes = {
children: PropTypes.node.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
export const BalanceLabelNumeral = ({ children, style }) => (
......
import React, { PureComponent } from 'react';
import { View, FlatList, TouchableOpacity, StyleSheet } from 'react-native';
import {
View,
FlatList,
TouchableOpacity,
StyleSheet,
ViewPropTypes,
} from 'react-native';
import PropTypes from 'prop-types';
import { createStyles, maxWidth } from './media-query';
import { color, breakWidth } from './style';
......@@ -37,7 +43,7 @@ export const ListContent = ({ children, style }) => (
ListContent.propTypes = {
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -89,7 +95,7 @@ export class ListItem extends PureComponent {
ListItem.propTypes = {
onSelect: PropTypes.func,
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -108,7 +114,7 @@ export const ListHeader = ({ style, children }) => (
ListHeader.propTypes = {
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -139,5 +145,5 @@ export class CardItem extends PureComponent {
}
CardItem.propTypes = {
style: View.propTypes.style,
style: ViewPropTypes.style,
};
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { StyleSheet, View, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
import { color } from './style';
......@@ -21,5 +21,5 @@ export const Circle = ({ children, style }) => (
Circle.propTypes = {
children: PropTypes.node.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
import React from 'react';
import { ScrollView, View, StyleSheet } from 'react-native';
import { ScrollView, StyleSheet, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
const styles = StyleSheet.create({
......@@ -17,7 +17,7 @@ const MainContent = ({ children, style }) => (
MainContent.propTypes = {
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
export default MainContent;
import React from 'react';
import { View, StyleSheet } from 'react-native';
import { View, StyleSheet, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
import { Button } from './button';
import { H4Text } from './text';
......@@ -50,7 +50,7 @@ Modal.propTypes = {
title: PropTypes.string.isRequired,
onClose: PropTypes.func.isRequired,
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
export default Modal;
import React, { Component } from 'react';
import { Animated, StyleSheet, View, SafeAreaView } from 'react-native';
import {
Animated,
StyleSheet,
View,
SafeAreaView,
ViewPropTypes,
} from 'react-native';
import PropTypes from 'prop-types';
import { SmallPillButton } from './button';
import { Text, H4Text } from './text';
......@@ -60,7 +66,7 @@ export const NotificationBar = ({ notification, display, style }) =>
NotificationBar.propTypes = {
notification: PropTypes.object,
display: PropTypes.bool.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -93,7 +99,7 @@ export const Alert = ({ type, style }) => (
Alert.propTypes = {
type: PropTypes.string.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -124,7 +130,7 @@ export const CountBubble = ({ children, style }) =>
CountBubble.propTypes = {
children: PropTypes.string.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -163,7 +169,7 @@ export const CopiedNotification = ({ display, color, style }) => (
CopiedNotification.propTypes = {
display: PropTypes.bool.isRequired,
color: PropTypes.string.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -202,5 +208,5 @@ class FadeInView extends Component {
FadeInView.propTypes = {
display: PropTypes.bool.isRequired,
children: PropTypes.node.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
import React, { Component } from 'react';
import { View, TouchableOpacity, StyleSheet } from 'react-native';
import {
View,
TouchableOpacity,
StyleSheet,
ViewPropTypes,
} from 'react-native';
import PropTypes from 'prop-types';
import { FormSubText, FormStretcher } from './form';
import { color, font } from './style';
......@@ -114,7 +119,7 @@ export class PasswordEntry extends Component {
PasswordEntry.propTypes = {
success: PropTypes.bool,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { StyleSheet, View, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
import Text from './text';
import Button from './button';
......@@ -30,7 +30,7 @@ export const PinBubbles = ({ pin, style }) => (
PinBubbles.propTypes = {
pin: PropTypes.string.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......
import React from 'react';
import { StyleSheet, View, Image } from 'react-native';
import { StyleSheet, View, Image, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
import QRImage from 'qr-image';
import { color } from './style';
......@@ -28,7 +28,7 @@ const QRCode = ({ children = '', size = 180, style }) => {
QRCode.propTypes = {
children: PropTypes.string.isRequired,
size: PropTypes.number,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
export default QRCode;
import React from 'react';
import { View, ScrollView, StyleSheet } from 'react-native';
import { View, ScrollView, StyleSheet, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
import Text from './text';
import { ListItem, ListHeader } from './list';
......@@ -45,7 +45,7 @@ export const SettingContent = ({ children, style }) => (
SettingContent.propTypes = {
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -74,7 +74,7 @@ export const SettingList = ({ children, style }) => (
SettingList.propTypes = {
children: PropTypes.node,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......@@ -144,5 +144,5 @@ export const SettingHeader = ({ name, style }) => (
SettingHeader.propTypes = {
name: PropTypes.string.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
......@@ -63,7 +63,7 @@ LoadNetworkSpinner.propTypes = {
continuous: PropTypes.bool,
percentage: PropTypes.number.isRequired,
msg: PropTypes.string.isRequired,
style: View.propTypes.style,
style: ViewPropTypes.style,
};
//
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment