import { Pressable, StyleSheet, View } from 'react-native'; import { colors } from '../../../src/theme'; import { Illustration } from './Illustration'; import type { AssetName } from '../assets'; interface Props { name?: AssetName; size?: number; selected?: boolean; onPress?: () => void; } /** 圆形头像占位:默认头像剪影 / 真实图;选中态加主色描边 */ export function Avatar({ name = 'defaultAvatar', size = 64, selected = false, onPress }: Props) { const content = ( ); if (onPress) return {content}; return content; } const styles = StyleSheet.create({ wrap: { borderWidth: 2, overflow: 'hidden', backgroundColor: colors.white }, });