diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-12-12 14:54:56 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-12-12 14:54:56 -0600 |
commit | b2239228e7ff5e2c9d6506803ffc12f3ef04378d (patch) | |
tree | c6307afa66929fb58729045f35d563ca44134faa /src/view/com/lightbox/ProfileImage.tsx | |
parent | b32bf69be7879cb9d321d937d1f2410412bbab7a (diff) | |
download | voidsky-b2239228e7ff5e2c9d6506803ffc12f3ef04378d.tar.zst |
Add profile image lightbox
Diffstat (limited to 'src/view/com/lightbox/ProfileImage.tsx')
-rw-r--r-- | src/view/com/lightbox/ProfileImage.tsx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/view/com/lightbox/ProfileImage.tsx b/src/view/com/lightbox/ProfileImage.tsx new file mode 100644 index 000000000..f9c4ae73e --- /dev/null +++ b/src/view/com/lightbox/ProfileImage.tsx @@ -0,0 +1,26 @@ +import React from 'react' +import {StyleSheet, useWindowDimensions, View} from 'react-native' +import {UserAvatar} from '../util/UserAvatar' +import {ProfileViewModel} from '../../../state/models/profile-view' + +export function Component({profileView}: {profileView: ProfileViewModel}) { + const winDim = useWindowDimensions() + const top = winDim.height / 2 - (winDim.width - 40) / 2 - 100 + return ( + <View style={[styles.container, {top}]}> + <UserAvatar + handle={profileView.handle} + displayName={profileView.displayName} + avatar={profileView.avatar} + size={winDim.width - 40} + /> + </View> + ) +} + +const styles = StyleSheet.create({ + container: { + position: 'absolute', + left: 20, + }, +}) |