import React from 'react'; import { Platform, TouchableOpacity } from 'react-native'; import { Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation'; import type { SendbirdMessage } from '@sendbird/uikit-utils'; import { useLocalization } from '../hooks/useContext'; type Props = { newMessages: SendbirdMessage[]; visible: boolean; onPress: () => void; }; const NewMessagesButton = ({ newMessages, visible, onPress }: Props) => { const { STRINGS } = useLocalization(); const { select, palette, colors } = useUIKitTheme(); if (newMessages.length === 0 || !visible) return null; return ( {STRINGS.GROUP_CHANNEL.LIST_BUTTON_NEW_MSG(newMessages)} ); }; const styles = createStyleSheet({ container: { paddingHorizontal: 12, paddingVertical: 10, borderRadius: 20, ...Platform.select({ android: { elevation: 4, }, ios: { shadowColor: 'black', shadowRadius: 4, shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.3, }, }), }, }); export default React.memo(NewMessagesButton);