function SofaLED ({ item, onChange, }) { return ( <Card> <CardHeader label="Sofa light" icon={require('app/assets/icon_bulb.png')} isEnabled={item.isEnabled} onChange={(state) => onChange(item.set('isEnabled', state))} /> <Slider value={parseInt(item.value)} onChange={(newValue) => onChange(item.set('value', newValue))} /> </Card> ); }
function ModeSwitch ({ value, onChange, }) { const isHeatMode = value === 'heat'; return ( <TouchableOpacity onPress={() => onChange(isHeatMode ? 'cool' : 'heat')}> <View> <View style={styles.background} /> <View style={[styles.circle, { marginLeft: !isHeatMode ? 25 : 2 }]} /> <Image source={require('app/assets/icon_hot.png')} style={styles.iconHot} resizeMode="contain" /> <Image source={require('app/assets/icon_cold_white.png')} style={styles.iconCold} resizeMode="contain" /> </View> </TouchableOpacity> ); }
style={styles.colorsImage} resizeMode="stretch" source={require('app/assets/color_picker.png')} />
<CardHeader label="AC" icon={require('app/assets/icon_ac.png')} isEnabled={item.isEnabled} onChange={(state) => onChange(item.set('isEnabled', state))} />
store = require('./store').store; });
render() { return ( <ScrollView style={styles.container}> <TouchableOpacity style={styles.image_view}> <Image style={styles.icon} source={require('image!logo')} esizeMode="contain"/> <Text style={styles.version}>V1.0.0</Text> </TouchableOpacity> <TouchableOpacity style={[styles.text_view,styles.text_margin]} onPress={this._showDetail.bind(this, About, "功能介绍")}> <Text style={styles.text}>功能介绍</Text> </TouchableOpacity> <TouchableOpacity style={[styles.text_view]} onPress={this._showDetail.bind(this, Help, "帮助中心")}> <Text style={styles.text}>帮助中心</Text> </TouchableOpacity> <TouchableOpacity style={[styles.text_view]} onPress={this._showDetail.bind(this, Detail, "服务条款")}> <Text style={styles.text}>服务条款</Text> </TouchableOpacity> <TouchableOpacity style={[styles.text_view,styles.text_view_bottom]} onPress={this._showAuthor}> <Text style={styles.text}>关于</Text> </TouchableOpacity> </ScrollView> ); }
getSignIn() { return { getSceneClass() { return require('../components/accounts/SignIn').default; }, getTitle() { return 'SignIn'; } } }
render() { return ( <View style={{flex: 1}}> <ImageBackground style={{height:100,width:300}} source={require('../../imgs/s63.png')} resizeMode='cover'> <Text style={{color:'red',fontSize:24}}> image 嵌入 text</Text> </ImageBackground> </View> ); }
const Banner = () => ( <SafeAreaView style={styles.bannerContainer} forceInset={{ top: 'always' }} > <View style={styles.banner}> <Image source={require('./assets/NavLogo.png')} style={styles.image} /> <Text style={styles.title}>React Navigation Examples</Text> </View> </SafeAreaView> )
const Rewind = ({ onPress, size = '28px' }) => ( <ClearButton onPress={onPress}> <Image source={require('../../assets/rewind.png')} height={size} width={size} /> </ClearButton> )
getChat(props) { return { renderScene(navigator) { let Chat = require('../components/chat/Chat').default return <Chat navigator={navigator} {...props} /> }, getTitle() { return 'Chat'; } } }
getMatches() { return { renderScene(navigator) { let Matches = require('../components/tinder/Matches').default return <Matches navigator={navigator} /> }, getTitle() { return 'Matches'; } } }
function Heating ({ item, onChange, }) { return ( <Card> <CardHeader label="Heating" icon={require('app/assets/icon_heat.png')} isEnabled={item.isEnabled} onChange={(newValue) => onChange(item.set('isEnabled', newValue))} /> <Slider value={parseInt(item.value)} onChange={(newValue) => onChange(item.set('value', newValue))} /> </Card> ); }