import React from 'react'; import { Pressable, TouchableOpacity, View } from 'react-native'; import type { GestureResponderEvent } from 'react-native'; import { Avatar, Box, Icon, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation'; import { conditionChaining } from '@sendbird/uikit-utils'; type Props = { uri: string; name: string; label?: string; muted: boolean; disabled: boolean; onPressActionMenu?: (ev: GestureResponderEvent) => void; onPressAvatar?: (ev: GestureResponderEvent) => void; }; const UserActionBar = ({ muted, uri, name, disabled, label, onPressActionMenu, onPressAvatar }: Props) => { const { colors } = useUIKitTheme(); const iconColor = conditionChaining([disabled], [colors.onBackground04, colors.onBackground01]); return ( {name} {Boolean(label) && ( {label} )} {Boolean(onPressActionMenu) && ( )} ); }; const styles = createStyleSheet({ container: { flexDirection: 'row', alignItems: 'center', width: '100%', height: 56, }, avatar: { marginStart: 16, marginEnd: 16, }, label: { marginEnd: 4, }, infoContainer: { height: '100%', flex: 1, alignItems: 'center', flexDirection: 'row', paddingEnd: 12, borderBottomWidth: 1, }, iconContainer: { padding: 4, }, name: { marginEnd: 8, }, }); export default UserActionBar;