UNPKG

viettel-ekyc-sdk

Version:
35 lines 1.22 kB
/* eslint-disable react-native/no-inline-styles */ import React from 'react'; import { Image, StyleSheet, Text, View } from 'react-native'; import { OS } from '../constants/OS'; import { SizedBox } from './SizedBox'; export const ListTitle = ({ avatar, title, isActive, }) => { return (React.createElement(View, { style: styles.listTitleContainer }, React.createElement(Image, { source: { uri: avatar }, style: { ...styles.avatar, borderColor: isActive ? 'green' : 'red' } }), React.createElement(SizedBox, { width: 10, height: 0 }), React.createElement(Text, { style: { ...styles.title, color: isActive ? 'green' : 'red' } }, title))); }; const styles = StyleSheet.create({ listTitleContainer: { backgroundColor: 'white', width: OS.WIDTH, flexDirection: 'row', alignItems: 'center', alignContent: 'center', paddingVertical: 10, paddingHorizontal: 15, }, avatar: { borderRadius: 32, width: 64, height: 64, borderWidth: 2, }, title: { color: 'green', letterSpacing: 0.46, fontSize: 20, fontWeight: '700', }, }); //# sourceMappingURL=ListTitle.js.map