{"size": 2042, "ext": "js", "max_stars_repo_path": "src/components/screens/ChatRoom/Item.js", "max_stars_repo_name": "awayismatch/cli", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/screens/ChatRoom/Item.js", "max_issues_repo_name": "awayismatch/cli", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/screens/ChatRoom/Item.js", "max_forks_repo_name": "awayismatch/cli", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.2045454545, "max_line_length": 69, "alphanum_fraction": 0.513712047}


import React from 'react';
import {connect} from 'react-redux'
import {
    StyleSheet,
    Text,
    View,
    Button
} from 'react-native';

class Component extends React.Component {
    render() {
        return (
            <View style={styles.container}>
                <View style={styles.roomType}>
                    <Text style={styles.typeText}>男</Text>
                    <Text style={styles.typeText}>女</Text>
                </View>
                <View style={styles.roomStatus}>
                    <Text style={styles.statusText}>21/30</Text>
                    <Text style={styles.statusText}>18/3</Text>
                </View>
                <Text style={styles.roomTopic}>说说租房遇到的奇葩事</Text>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        borderColor: 'grey',
        // borderLeftWidth: 3,
        // borderTopWidth: 0,
        // borderRightWidth: 0,
        borderBottomWidth: 1,
        justifyContent: 'flex-start',
        flexDirection:'row',
        alignItems: 'center',
        backgroundColor: '#F5FCFF',
        height:50,

    },
    statusText:{
        textAlign:'center',
        flex:1,
    },
    typeText:{
        textAlign:'center',
        flex:1,
    },
    roomType:{
        width:30,
        borderColor: 'grey',
        borderRightWidth: 0.5,
    },
    roomStatus:{
        width:50,
        borderColor: 'grey',
        // justifyContent: 'center',
        // flexDirection:'column',
        borderRightWidth: 0.5,
    },
    roomTopic:{
        fontSize:20,
        flex:1,
        textAlign:'center',
    }
});

const mapStateToProps = (state, ownProps) => {
    return {
        demo: state.demo
    }
}

const mapDispatchToProps = (dispatch, ownProps) => {
    return {
        onIncrease: () => {
            dispatch({type:'demo.increase'})
        },
        onDecrease: ()=>{
            dispatch({type:'demo.decrease'})
        }
    }
}
export default connect(mapStateToProps,mapDispatchToProps)(Component)