Skip to content

Instantly share code, notes, and snippets.

@DeVoresyah
Created March 24, 2020 22:03
Show Gist options
  • Save DeVoresyah/869767547ced1373cb0354e36a98b594 to your computer and use it in GitHub Desktop.
Save DeVoresyah/869767547ced1373cb0354e36a98b594 to your computer and use it in GitHub Desktop.
[Draft Example] React Native Style Framework
import React, { Component } from 'react';
import {
View,
Text,
StatusBar,
TouchableOpacity
} from 'react-native';
import styles from './styles'
import colors from './styles/data/colors'
class App extends Component {
constructor(props) {
super(props);
}
render() {
return (
<View style={styles([
"flex",
"items-center",
"justify-center"
])}>
<StatusBar backgroundColor={colors["red500"]} barStyle="light-content" />
<Text style={styles([
"text-6xl",
"font-medium",
"text-center",
"mb-5"
])}>Welcome to MobCSX!</Text>
<TouchableOpacity
activeOpacity={0.8}
style={styles([
"bg-red-500",
"rounded",
"p-2",
"px-4"
])}>
<Text style={styles([
"text-white"
])}>Click Here!</Text>
</TouchableOpacity>
</View>
)
}
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment