Skip to content

Commit

Permalink
Initial commit, taking into account the possible issue below
Browse files Browse the repository at this point in the history
This is just a fallback in case flex-button doesn't work.
facebook/react-native#213
If you name your app with hyphens react-native will create a
broken project by default.
This is not a project, so it shouldn't be an issue, but we'll see.
  • Loading branch information
knod committed Mar 25, 2018
1 parent 7569b38 commit 76a83db
Show file tree
Hide file tree
Showing 4 changed files with 7,088 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# misc
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

#mac
.DS_Store
44 changes: 44 additions & 0 deletions FlextButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// A standard UI button (big by default)

import React from 'react';
import { Text, TouchableOpacity } from 'react-native';


const FlexButton = function ({ extraStyles, textStyles, onPress, children }) {

extraStyles = extraStyles || {};
textStyles = textStyles || {};

return (
<TouchableOpacity
style = {[ styles.button, extraStyles ]}
onPress = { onPress } >

<Text style={[ styles.buttonText, textStyles ]}> { children } </Text>

</TouchableOpacity>
);

}; // End <FlexButton>


const styles = {
button: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
padding: 3,
borderRadius: 8,
borderColor: 'white',
borderWidth: 1,
backgroundColor: 'gray',
},
buttonText: {
color: 'white',
fontSize: 15,
},
}; // end styles

export {
FlexButton,
};
Loading

0 comments on commit 76a83db

Please sign in to comment.