73 lines
2.5 KiB
TypeScript
73 lines
2.5 KiB
TypeScript
// Metro module 8069 (f8070).
|
|
import { View } from "react-native";
|
|
import ThemeStore from "../../../user_settings/ThemeStore";
|
|
import { AvatarSizes, Avatar } from "../../../../design/void/native";
|
|
import Module712 from "../../../../_bundle/Module712";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import { useStateFromStores } from "../../../../_bundle/Module589";
|
|
import { isThemeDark } from "../../../../design/utils/shared/themes";
|
|
import Nameplate from "./Nameplate";
|
|
import Module8072 from "../../../../_bundle/Module8072";
|
|
import Module8073 from "../../../../_bundle/Module8073";
|
|
const r24 = {};
|
|
r24[AvatarSizes.XSMALL_20] = {
|
|
padding: Module712.space.PX_4,
|
|
avatarMarginRight: Module712.space.PX_4,
|
|
placeholderBarHeight: 6
|
|
};
|
|
r24[AvatarSizes.XSMALL] = {
|
|
padding: 6,
|
|
avatarMarginRight: 6,
|
|
placeholderBarHeight: 8
|
|
};
|
|
r24[AvatarSizes.NORMAL] = {
|
|
padding: Module712.space.PX_8,
|
|
avatarMarginRight: Module712.space.PX_8,
|
|
placeholderBarHeight: 14
|
|
};
|
|
let c5116_7 = r24;
|
|
const useStyles = createStyles((a0, a1) => {
|
|
const r7 = c5116_7[a0];
|
|
return {
|
|
container: {
|
|
padding: r7.padding,
|
|
flexDirection: "row",
|
|
alignItems: "center",
|
|
justifyContent: "flex-start",
|
|
width: "100%",
|
|
position: "relative",
|
|
borderRadius: Module712.radii.sm
|
|
},
|
|
avatarContainer: {
|
|
borderRadius: Module712.radii.round,
|
|
marginRight: r7.avatarMarginRight,
|
|
backgroundColor: a1 ? Module712.colors.BORDER_STRONG : "transparent"
|
|
},
|
|
avatar: {
|
|
opacity: a1 ? 0 : 0.5
|
|
},
|
|
placeholderBar: {
|
|
borderRadius: Module712.radii.md,
|
|
height: r7.placeholderBarHeight,
|
|
backgroundColor: Module712.colors.BORDER_STRONG
|
|
},
|
|
nameplate: {
|
|
borderRadius: Module712.radii.sm
|
|
}
|
|
};
|
|
});
|
|
export { c5116_7 as NAMEPLATE_DUMMY_USER_PREVIEW_CONFIG };
|
|
export function NameplateDummyUserPreview(props) {
|
|
const { width, hideAvatar = false, avatarSize = AvatarSizes.NORMAL, nameplate, style, animate = false } = props;
|
|
const styles = useStyles(avatarSize, hideAvatar);
|
|
return <View style={[styles.container, style]}>
|
|
<Nameplate nameplate={nameplate} fullOpacity style={styles.nameplate} animate={animate} />
|
|
<View style={styles.avatarContainer}>
|
|
<Avatar source={useStateFromStores([ThemeStore], () => isThemeDark(ThemeStore.theme)) ? Module8072 : Module8073} size={avatarSize} aria-hidden style={styles.avatar} />
|
|
</View>
|
|
<View style={[styles.placeholderBar, {
|
|
width
|
|
}]} />
|
|
</View>;
|
|
}
|