import * as React from 'react' import {Image, ImageSourcePropType, View, ViewStyle} from 'react-native' interface MaterialCardProps { elevation?: number, margin?:number, header?(): React.ReactNode, style?:ViewStyle, backgroundImageSource?: ImageSourcePropType, backgroundColor?:string } export default class MaterialCard extends React.Component { static defaultProps={ header:()=>{}, elevation:2, margin:8, backgroundColor:'#eeeeee' }; render() { return ( {this.props.backgroundImageSource && } {this.props.header()} {this.props.children} ) } }