123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import React from 'react';
- import { StyleSheet, Text, View, TextInput, Button } from 'react-native';
- import Types from '../../lib/Types';
- export default function BaseContainer(props) {
- let {
- selected,
- width,
- height,
- overflow,
- marginBottom,
- shadowColor,
- shadowWidth,
- shadowHeight,
- backgroundColor,
- ...restProps
- } = props;
- if(!width) width = BaseContainer.Inputs.width.default;
- if(!height) height = BaseContainer.Inputs.height.default;
- if(!backgroundColor) backgroundColor = '';
- if(!marginBottom) marginBottom = 0;
- if(!shadowColor) shadowColor = '';
- if(!shadowWidth) shadowWidth = 0;
- if(!shadowHeight) shadowHeight = 0;
- return (
- <View {...restProps} style={{width, height, overflow , backgroundColor , marginBottom , shadowColor,shadowOffset:{width:shadowWidth,height:shadowHeight}}}>
- </View>
- );
- }
- BaseContainer.Inputs = {
- width: new Types.Integer().require().default(50),
- height: new Types.Integer().require().default(50),
- overflow: new Types.Integer().require().default('hidden'),
- backgroundColor: new Types.Text().require().color(),
- marginBottom:new Types.Integer().require().default(0),
- shadowColor: new Types.Text().require().color().default(""),
- shadowWidth: new Types.Integer().require(),
- shadowHeight: new Types.Integer().require()
- }
|