ContainerView.js 1.01 KB
import React, {Component} from 'react';
import {
    View,
    Text,
} from "react-native";
import {getTextAlignVerticalStyle} from "../utils/Common";
const defaultHeight = (30);
const HPading = (16);
const VPading = (6);
/**
 * 布局容器
 */
export default class ContainerView extends Component {

    constructor(props) {
        super(props);
        this.state = {}
        this.attrData = this.props.attrData;
        this.onDeleterListener = this.props.onDeleterListener;
    }

    render() {
        let {name, code, type, description, isRequired, isPreview} = this.attrData;
        return (
            <View style={{width: '100%',paddingHorizontal:HPading,height:defaultHeight, backgroundColor: 'rgba(245, 245, 245, 1)'}}>
                <View style={{flexDirection: 'row', justifyContent:'flex-start',alignItems: 'center'}}>
                    <Text style={[{fontSize: 14, color: 'rgb(51,51,51)'},getTextAlignVerticalStyle(defaultHeight)]}>{name}</Text>
                </View>
            </View>
        );
    }
}