0.0.8 • Published 7 years ago
mjui v0.0.8
mjui
mjui is a enhancd ui component library for react native.
##Content
Getting Started
- run npm install mjui
- import mjui from 'mjui'
Basic Usage
'use strict';
import React from 'react';
import {
StyleSheet,
View,
Text,
} from 'react-native';
import { Toast, Button } from 'mjui';
import BasePage from '../_base/BasePage';
const styles = StyleSheet.create({
container: {
paddingTop: 20,
backgroundColor: '#fff'
},
});
class ButtonScreen extends BasePage {
showToast() {
Toast.show('Oops, U pressed me!');
}
render() {
return (
<View style={styles.container}>
<Text>Button Type:</Text>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<Button onPress={this.showToast} text={'default'} type={'default'} containerStyle={{ marginLeft: 10 }} />
<Button onPress={this.showToast} text={'warn'} type={'warn'} containerStyle={{ marginLeft: 10 }} />
<Button onPress={this.showToast} text={'sec'} type={'sec'} containerStyle={{ marginLeft: 10 }} />
<Button onPress={this.showToast} text={'thr'} type={'thr'} containerStyle={{ marginLeft: 10 }} />
</View>
</View>
);
}
}
export default ButtonScreen;