-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit, taking into account the possible issue below
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
Showing
4 changed files
with
7,088 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}; |
Oops, something went wrong.