Skip to content

Instantly share code, notes, and snippets.

View rajatgeekyants's full-sized avatar

Content Writer rajatgeekyants

View GitHub Profile
class Button extends React.Component {
render() {
return (
<TouchableOpacity
style={{
backgroundColor: "blue",
padding: 20,
borderRadius: 50
}}
>
const styles = StyleSheet.create({
box: {
backgroundColor: "blue",
padding: 20,
borderRadius: 50
},
text: {
color: "white",
fontSize: 20
}
class App extends React.Component {
render() {
return (
<View>
<View>
<Text>Header</Text>
</View>
<ScrollView>
<Button title="Awesome Button" />
</ScrollView>
const styles = StyleSheet.create({
container: {
backgroundColor: "#fff"
},
header: {
backgroundColor: "#c0392b",
height: 56,
paddingTop: 10
},
headerText: {
import Icon from "react-native-vector-icons/Ionicons";
function ExampleView(props) {
return <Icon name="ios-person" />;
}
Svg height="100" width="100">
<Circle
cx="50"
cy="50"
r="45"
stroke="blue"
strokeWidth="2.5"
fill="green"
/>
<Rect
import React, { Component } from 'react';
import { Container, Header, Title, Button, Left, Right, Body, Icon } from 'native-base';
export default class HeaderExample extends Component {
render() {
return (
<Container>
<Header>
<Left>
<Button transparent>
<Icon name='menu' />
container: {
backgroundColor: "#fff",
flex: 1
}
import React, { Component } from 'react';
import { AppRegistry, StyleSheet, Text, View } from 'react-native';
export default class LotsOfStyles extends Component {
render() {
return (
<View style={styles.greybox}>
<Text>Lorem Ipsum</Text>
</View>
);
body: new Container(
decoration: new BoxDecoraction(
image: backgroundImage,
),
)