Giter VIP home page Giter VIP logo

drinkingtime's People

Contributors

brianium avatar

Stargazers

 avatar

Watchers

 avatar  avatar

drinkingtime's Issues

Be more explicit on screen styling

react-navigation screen components seem to influence styling, the easiest solution seems to be fixing it at the screen level in the ui package. Just be sure to explicitly set background colors and set margins on components within the screen, not the screen itself:

For instance, the home screen becomes: (note styles.view and styles.button)

import React from 'react';
import { StyleSheet, View } from 'react-native';
import SafeAreaView from '../../components/SafeAreaView';
import Text, { TextStyle } from '../../components/Text';
import Button from '../../components/Button';
import Drink, { DrinkType, Size } from '../../components/Drink';
import colors from '../../lib/colors';
const Home = (props) => (<SafeAreaView style={styles.view}>
    <Drink size={Size.Large} style={styles.drink} type={DrinkType.Beer}/>
    <Text style={styles.title} textStyle={TextStyle.Title}>
      Drinking Time
    </Text>
    <View style={styles.button}>
      <Button text="Start Drinking" onPress={props.onButtonPress}/>
    </View>
  </SafeAreaView>);
const styles = StyleSheet.create({
    button: {
        flex: 1,
        justifyContent: 'flex-end',
        marginBottom: 83,
        width: '100%',
    },
    drink: {
        marginTop: 62,
    },
    title: {
        color: colors.black,
        fontSize: 48,
        marginTop: 24,
    },
    view: {
        backgroundColor: 'white',
        alignItems: 'center',
        justifyContent: 'center',
    },
});
export default Home;

User screen enhancements

A couple of user screen enhancements:

  1. TextInput should use onChangeText instead of onEndEditing
  2. first-time should not be a screen state, but a boolean prop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.