0.0.4 • Published 8 years ago

tsuicomponent v0.0.4

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

TSReactUI

UI Component for using react

TODO push this to NPM repository

Use TS Moblie UI Component

Currently installation guide from local disk

  1. Clone this project to local disk

  2. Install the package from local disk, like

    npm install <disk_path> --save

  3. Use UIComponent as below:

    var React = require('react-native');
    var TSButton = require('tsuicomponent').TSButton;
    
    var {
    
      AppRegistry,
    
      StyleSheet,
    
      Text,
    
      View,
    
    } = React;
    
    var TestUI = React.createClass({
    
      render: function() {
    
        return (
          <View style={styles.container}>
           <TSButton>Click Me</TSButton>
        
          </View> 
        );
    
      }
    
    });
    
    var styles = StyleSheet.create({
    
      container: {
    
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#F5FCFF',
    
      },
    
      welcome: {
    
        fontSize: 20,
        textAlign: 'center',
        margin: 10,
    
      },
    
      instructions: {
    
        textAlign: 'center',
        color: '#333333',
        marginBottom: 5,
    
      },
    
    });
    
    AppRegistry.registerComponent('TestUI', () => TestUI);

Develop UI Component

Any chagnes that apply to this project should increate the version number in package.json, it help client to update the ui component.

"version": "0.0.1",

Currently we have 2 UI components exposed in index.js, if we have new components, please add the similar statement below:

var button = require('./TSButton');
var listView = require('./TSListview');

module.exports.TSButton = button;
module.exports.TSListView = listView;

Update UI Component for client

Once the component is updated, in the client project execute:

npm updte