UNPKG

@livelike/react-native

Version:

LiveLike React Native package

51 lines 1.17 kB
import React from 'react'; import { StyleSheet, View, Image } from 'react-native'; import { useStyles } from '../../hooks'; import { LLText } from '../LLText'; export function LLAlertWidgetDetail(_ref) { let { text, imageUrl, styles: stylesProp } = _ref; const styles = useStyles({ componentStylesFn: getAlertWidgetDetailStyles, stylesProp }); return /*#__PURE__*/React.createElement(View, { style: styles.container }, !!text && /*#__PURE__*/React.createElement(LLText, { style: styles.text }, text), !!imageUrl && /*#__PURE__*/React.createElement(Image, { source: { uri: imageUrl }, style: styles.image, resizeMode: "contain" })); } const getAlertWidgetDetailStyles = _ref2 => { let { theme } = _ref2; return StyleSheet.create({ container: { display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center', width: '100%' }, text: { flex: 2, fontSize: 12, color: theme.text }, image: { flex: 1, maxWidth: 100, height: 70 } }); }; //# sourceMappingURL=LLAlertWidgetDetail.js.map