reactnativecomponents
Version:
React Native Components
23 lines (22 loc) • 676 B
JavaScript
import * as React from 'react';
import Component from '../AbstractComponent';
import { Text, View } from 'react-native';
import * as styles from './styles';
/**
* @author 田尘殇Sean(sean.snow@live.com) create at 2018/1/31
*/
export class Blockquote extends Component {
render() {
const { style, type, title, titleStyle, children } = this.props;
return (<View style={[styles.container, styles[type], style]}>
{title && (<Text style={[
styles.titleText,
{ color: (styles[type] || {}).borderLeftColor },
titleStyle
]}>
{title}
</Text>)}
{children}
</View>);
}
}