Implement scene member/memberships listings
This commit is contained in:
parent
e6429182a1
commit
0cdfd089f5
10 changed files with 379 additions and 44 deletions
59
src/view/com/profile/ProfileCard.tsx
Normal file
59
src/view/com/profile/ProfileCard.tsx
Normal file
|
@ -0,0 +1,59 @@
|
|||
import React from 'react'
|
||||
import {StyleSheet, Text, View} from 'react-native'
|
||||
import {Link} from '../util/Link'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
|
||||
export function ProfileCard({
|
||||
did,
|
||||
handle,
|
||||
displayName,
|
||||
description,
|
||||
}: {
|
||||
did: string
|
||||
handle: string
|
||||
displayName?: string
|
||||
description?: string
|
||||
}) {
|
||||
return (
|
||||
<Link style={styles.outer} href={`/profile/${handle}`} title={handle}>
|
||||
<View style={styles.layout}>
|
||||
<View style={styles.layoutAvi}>
|
||||
<UserAvatar size={40} displayName={displayName} handle={handle} />
|
||||
</View>
|
||||
<View style={styles.layoutContent}>
|
||||
<Text style={[s.f16, s.bold]}>{displayName || handle}</Text>
|
||||
<Text style={[s.f15, s.gray5]}>@{handle}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
outer: {
|
||||
marginTop: 1,
|
||||
backgroundColor: colors.white,
|
||||
},
|
||||
layout: {
|
||||
flexDirection: 'row',
|
||||
},
|
||||
layoutAvi: {
|
||||
width: 60,
|
||||
paddingLeft: 10,
|
||||
paddingTop: 10,
|
||||
paddingBottom: 10,
|
||||
},
|
||||
avi: {
|
||||
width: 40,
|
||||
height: 40,
|
||||
borderRadius: 20,
|
||||
resizeMode: 'cover',
|
||||
},
|
||||
layoutContent: {
|
||||
flex: 1,
|
||||
paddingRight: 10,
|
||||
paddingTop: 12,
|
||||
paddingBottom: 10,
|
||||
},
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue