UNPKG

tbom

Version:

Taobao Open Platform Modules

46 lines (40 loc) 1.13 kB
import {createElement, Component} from 'rax'; import View from 'tboc-view'; import Text from 'tboc-text'; import styles from '../common/style.css'; import { toast } from '../../../src/index'; class Share extends Component { render() { return ( <View style={styles.app}> <View clickable={true}style={styles.text} onPress={() => {toast.show('Hi')}} style={demoStyles.button}>Hi</View> <View clickable={true}style={styles.text} onPress={() => {toast.show('Hello Short', toast.SHORT)}} style={demoStyles.button}>Hello Short</View> <View clickable={true}style={styles.text} onPress={() => {toast.show('Hello Long', toast.LONG)}} style={demoStyles.button}>Hello Long</View> </View> ); } } const demoStyles = { input: { borderWidth: 2, borderColor: '#CCC', borderStyle: 'solid' }, text: { paddingLeft: 20, paddingRight: 20 }, button: { borderWidth: 2, borderColor: '#CCC', borderStyle: 'solid', paddingLeft: 20, paddingRight: 20, marginTop: 40, backgroundColor: '#EEE' } } export default Share;