Rocket.Chat.ReactNative/app/containers/HeaderButton/HeaderButtonItemBadge.tsx

23 lines
620 B
TypeScript
Raw Normal View History

import React from 'react';
2023-02-14 13:47:56 +00:00
import { StyleSheet, View } from 'react-native';
import UnreadBadge from '../UnreadBadge';
const styles = StyleSheet.create({
badgeContainer: {
padding: 2,
position: 'absolute',
right: 2,
top: 2,
borderRadius: 10,
alignItems: 'center',
justifyContent: 'center'
}
});
2023-02-14 13:47:56 +00:00
export const BadgeUnread = ({ ...props }): React.ReactElement => <UnreadBadge {...props} style={styles.badgeContainer} small />;
2023-10-19 13:38:57 +00:00
export const BadgeWarn = ({ color }: { color: string }): React.ReactElement => (
<View style={[styles.badgeContainer, { width: 10, height: 10, backgroundColor: color }]} />
2023-02-14 13:47:56 +00:00
);