mattermost-mobile/app/components/post_list/post/unread_dot.tsx
Anurag Shivarathri 313fe9c469
In-Channel experience (#6141)
* User avatar stack

* In-Channel experience

* Misc Fixes

* Fixed fetchPostThread & added observer

* Reusing the user component

* Refactor fix

* Moved some post options to common post options

* Combined follow/unfollow functions

* Feedback fixes

* Feedback fixes

* teamId fix

* Fixed teamId again

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-19 11:42:20 -04:00

46 lines
1.1 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {View} from 'react-native';
import {useTheme} from '@context/theme';
import {makeStyleSheetFromTheme} from '@utils/theme';
type Props = {
testID: string;
};
const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => {
return {
badgeContainer: {
position: 'absolute',
left: 21,
bottom: 9,
},
unreadDot: {
width: 8,
height: 8,
borderRadius: 4,
backgroundColor: theme.sidebarTextActiveBorder,
alignSelf: 'center',
top: -6,
left: 4,
},
};
});
const UnreadDot = ({testID}: Props) => {
const theme = useTheme();
const styles = getStyleSheet(theme);
return (
<View
style={styles.badgeContainer}
testID={testID}
>
<View style={styles.unreadDot}/>
</View>
);
};
export default UnreadDot;