MCPcopy Create free account
hub / github.com/CommE2E/comm / ThreadVisibility

Function ThreadVisibility

native/components/thread-visibility.react.js:17–36  ·  view source on GitHub ↗
(props: Props)

Source from the content-addressed store, hash-verified

15 +color: string,
16};
17function ThreadVisibility(props: Props): React.Node {
18 const { threadType, color } = props;
19 const label = threadLabel(threadType);
20
21 const iconColor = React.useMemo(
22 () => (tinycolor(color).isDark() ? 'white' : 'black'),
23 [color],
24 );
25
26 const icon = React.useMemo(
27 () => <ThreadIcon threadType={threadType} color={iconColor} />,
28 [iconColor, threadType],
29 );
30
31 return (
32 <View style={styles.container}>
33 <Pill icon={icon} label={label} backgroundColor={color} />
34 </View>
35 );
36}
37
38const styles = StyleSheet.create({
39 container: {

Callers

nothing calls this directly

Calls 1

threadLabelFunction · 0.90

Tested by

no test coverage detected