Fixed bootstrap link

This commit is contained in:
Lallo Vigil
2018-10-16 22:24:02 -05:00
committed by Kristofer Koishigawa
parent 80918b962a
commit 018f941277

View File

@ -1,6 +1,7 @@
---
title: Styling
---
## React Native - Styling
React Native provides an API for creating stylesheets and styling your components: [StyleSheet](https://facebook.github.io/react-native/docs/stylesheet).
@ -22,11 +23,11 @@ export default class App extends Component {
const styles = StyleSheet.create({
header: {
fontSize: 20
fontSize: 20,
},
text: {
color: 'blue'
}
color: 'blue',
},
});
```
@ -60,9 +61,7 @@ const Button = ({ onPress, children }) => {
const { buttonStyle, textStyle } = styles;
return (
<TouchableOpacity onPress={onPress} style={buttonStyle}>
<Text style={textStyle}>
{children}
</Text>
<Text style={textStyle}>{children}</Text>
</TouchableOpacity>
);
};
@ -76,7 +75,7 @@ const styles = {
fontSize: 16,
fontWeight: '600',
paddingTop: 10,
paddingBottom: 10
paddingBottom: 10,
},
buttonStyle: {
backgroundColor: '#fff',
@ -87,8 +86,8 @@ const styles = {
paddingRight: 25,
paddingLeft: 25,
marginTop: 10,
width: 300
}
width: 300,
},
};
```
@ -103,8 +102,8 @@ export default class Login extends Component {
render() {
return (
<View>
<TextInput placeholder='Username or Email' />
<TextInput placeholder='Password' />
<TextInput placeholder="Username or Email" />
<TextInput placeholder="Password" />
<Button>Log In</Button>
</View>
);
@ -114,4 +113,4 @@ export default class Login extends Component {
### Libraries for Styling
There are a few popular libraries for styling React Native. Some of them provide features similar to [Bootstrap](../../bootstrap/index.md), including default forms, button styles, and page layout options. One of the most popular libraries is [styled-components](https://github.com/styled-components/styled-components). There are many others you can find on npm and GitHub to try for yourself.
There are a few popular libraries for styling React Native. Some of them provide features similar to [Bootstrap](../../bootstrap), including default forms, button styles, and page layout options. One of the most popular libraries is [styled-components](https://github.com/styled-components/styled-components). There are many others you can find on npm and GitHub to try for yourself.