UNPKG

ignite-jhipster

Version:

A React Native boilerplate for JHipster apps.

33 lines (27 loc) 809 B
import React from 'react' import PropTypes from 'prop-types' import { View, Text } from 'react-native' import styles from './alert-message.styles' export default class AlertMessage extends React.Component { static defaultProps = { show: true } static propTypes = { title: PropTypes.string, icon: PropTypes.string, style: PropTypes.object, show: PropTypes.bool } render () { const messageComponent = null if (this.props.show) { const { title } = this.props return ( <View style={[styles.container, this.props.style]}> <View style={styles.contentContainer}> <Text allowFontScaling={false} style={styles.message}>{title && title.toUpperCase()}</Text> </View> </View> ) } return messageComponent } }