diff --git a/ios/kitsu_mobile.xcodeproj/project.pbxproj b/ios/kitsu_mobile.xcodeproj/project.pbxproj index 76d8ecca5..5ec6024fd 100644 --- a/ios/kitsu_mobile.xcodeproj/project.pbxproj +++ b/ios/kitsu_mobile.xcodeproj/project.pbxproj @@ -5,7 +5,6 @@ }; objectVersion = 46; objects = { - /* Begin PBXBuildFile section */ 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; diff --git a/src/assets/img/onboarding/index.js b/src/assets/img/onboarding/index.js index 62567bc3b..c32b15fd3 100644 --- a/src/assets/img/onboarding/index.js +++ b/src/assets/img/onboarding/index.js @@ -2,10 +2,12 @@ import intro1 from './intro1.png'; import intro2 from './intro2.png'; import intro3 from './intro3.png'; import intro4 from './intro4.png'; +import placeholderImage from './placeholderImage.png'; export { intro1, intro2, intro3, intro4, + placeholderImage, }; diff --git a/src/assets/img/onboarding/placeholderImage.png b/src/assets/img/onboarding/placeholderImage.png new file mode 100644 index 000000000..162551565 Binary files /dev/null and b/src/assets/img/onboarding/placeholderImage.png differ diff --git a/src/components/Button/component.js b/src/components/Button/component.js new file mode 100644 index 000000000..81d07d7a5 --- /dev/null +++ b/src/components/Button/component.js @@ -0,0 +1,58 @@ +import React from 'react'; +import { View, TouchableOpacity, Text, ActivityIndicator, ViewPropTypes } from 'react-native'; +import Icon from 'react-native-vector-icons/FontAwesome'; +import { PropTypes } from 'prop-types'; +import { styles } from './styles'; + +const LoadingComponent = () => ( + + + +); + +export const Button = ({ + style, + title, + titleStyle, + icon, + iconStyle, + onPress, + loading, + disabled, +}) => ( + + {loading ? + : + {icon ? : null} + + {title} + + + } + +); + +Button.propTypes = { + ...TouchableOpacity.propTypes, + style: ViewPropTypes.style, + title: PropTypes.string.isRequired, + titleStyle: PropTypes.oneOfType([PropTypes.number, PropTypes.object]), + icon: PropTypes.string, + iconStyle: PropTypes.oneOfType([PropTypes.number, PropTypes.object]), + onPress: PropTypes.func.isRequired, + loading: PropTypes.bool, + disabled: PropTypes.bool, +}; +Button.defaultProps = { + style: null, + title: 'Save', + titleStyle: null, + icon: null, + iconStyle: null, + loading: false, + disabled: false, +}; diff --git a/src/components/Button/index.js b/src/components/Button/index.js new file mode 100644 index 000000000..bb824842c --- /dev/null +++ b/src/components/Button/index.js @@ -0,0 +1 @@ +export * from './component'; diff --git a/src/components/Button/styles.js b/src/components/Button/styles.js new file mode 100644 index 000000000..d56fcfc0c --- /dev/null +++ b/src/components/Button/styles.js @@ -0,0 +1,33 @@ +import { StyleSheet } from 'react-native'; +import * as colors from 'kitsu/constants/colors'; + +export const styles = StyleSheet.create({ + button: { + marginVertical: 4, + marginHorizontal: 16, + backgroundColor: colors.green, + height: 47, + borderRadius: 4, + }, + buttonDisabled: { + backgroundColor: colors.buttonDisabledColor, + }, + contentWrapper: { + flex: 1, + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + }, + title: { + color: colors.white, + fontFamily: 'OpenSans', + lineHeight: 25, + fontSize: 15, + }, + icon: { + fontSize: 20, + color: colors.white, + paddingRight: 8, + paddingLeft: 8, + }, +}); diff --git a/src/constants/colors.js b/src/constants/colors.js index b5ca35cc2..06206e756 100644 --- a/src/constants/colors.js +++ b/src/constants/colors.js @@ -37,6 +37,7 @@ export const offBlack = '#2B212B'; export const softBlack = '#333'; /* misc */ +export const transparent = 'transparent'; export const buttonDisabledColor = '#878787'; export const imageBackColor = 'rgb(153, 130, 153)'; export const listSeparatorColor = '#261C25'; diff --git a/src/screens/Onboarding/OnboardingScreen.js b/src/screens/Onboarding/OnboardingScreen.js index 76b6f2ccd..056fc5b26 100644 --- a/src/screens/Onboarding/OnboardingScreen.js +++ b/src/screens/Onboarding/OnboardingScreen.js @@ -1,6 +1,7 @@ import React from 'react'; -import { View, Text, TouchableOpacity, ScrollView, Dimensions } from 'react-native'; +import { View, ScrollView, Dimensions } from 'react-native'; import { intro1, intro2, intro3, intro4 } from 'kitsu/assets/img/onboarding/'; +import { Button } from 'kitsu/components/Button'; import { OnboardingHeader } from './common/'; import styles from './styles'; import Step from './Step'; @@ -66,31 +67,32 @@ export default class OnboardingScreen extends React.Component { return ( - - - - - - {this.renderStep()} - - + + + + + {this.renderStep()} + + + {this.renderDots()} +