Add profile image lightbox
This commit is contained in:
parent
b32bf69be7
commit
b2239228e7
11 changed files with 154 additions and 47 deletions
26
src/view/com/lightbox/ProfileImage.tsx
Normal file
26
src/view/com/lightbox/ProfileImage.tsx
Normal file
|
@ -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,
|
||||
},
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue