import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import { Avatar } from '../Avatar/Avatar'; import { useTheme } from '../../contexts/themeContext/ThemeContext'; import { AtMentions } from '../../icons/AtMentions'; import type { SuggestionUser } from '../../contexts/suggestionsContext/SuggestionsContext'; import type { DefaultUserType } from '../../types/types'; const styles = StyleSheet.create({ column: { flex: 1, justifyContent: 'space-evenly', paddingLeft: 8, }, container: { alignItems: 'center', flexDirection: 'row', paddingHorizontal: 16, paddingVertical: 8, }, name: { fontSize: 14, fontWeight: 'bold', paddingBottom: 2, }, tag: { fontSize: 12, fontWeight: '600', }, }); export type MentionsItemProps = { /** * A UserResponse of suggested UserTypes with these properties * * - id: User ID of the suggested mention user * - image: Image to be shown as the Avatar for the user * - name: Name of the suggested mention user */ item: SuggestionUser; }; export const MentionsItem = ({ item: { id, image, name, online }, }: MentionsItemProps) => { const { theme: { colors: { accent_blue, black, grey }, messageInput: { suggestions: { mention: { avatarSize, column, container, name: nameStyle, tag }, }, }, }, } = useTheme(); return ( {name || id} {`@${id}`} {/* */} ); }; MentionsItem.displayName = 'MentionsItem{messageInput{suggestions{mention}}}';