28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
// Metro module 14983 (f14984).
|
|
import { View } from "react-native";
|
|
import { useSubtitleStyles } from "./useSubtitleStyles";
|
|
import { getChannelIconComponentWithGuild } from "../../../../utils/native/ChannelUtils";
|
|
import { TextIcon } from "../../../../design/components/Icon/native/redesign/generated/TextIcon";
|
|
import { Text } from "../../../../design/components/Text/native/Text";
|
|
import { intl, t } from "../../../../intl/index.native";
|
|
export default function MentionSubtitle(props) {
|
|
const { guild, channel, channelName, count } = props;
|
|
const styles = useSubtitleStyles();
|
|
let Component = channel != null ? getChannelIconComponentWithGuild(channel, guild) : void 0;
|
|
if (Component == null) {
|
|
Component = TextIcon;
|
|
}
|
|
return <View style={styles.subtitleRow}>
|
|
<Component size="xxs" color="icon-muted" style={styles.channelIcon} />
|
|
<Text variant="text-xs/medium" color="text-muted" lineClamp={1} style={styles.subtitleText}>
|
|
{intl.format(t.L9YdGH, {
|
|
channelName,
|
|
count: count - 1,
|
|
channelHook: (a0, a1) => <Text key={a1} variant="text-xs/medium">
|
|
{a0}
|
|
</Text>
|
|
})}
|
|
</Text>
|
|
</View>;
|
|
};
|