diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-12-30 13:20:55 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-12-30 13:20:55 -0600 |
commit | 9084e0e4a8ba14c59ec2ee29f8035eb854d11e87 (patch) | |
tree | 7c8d7c79b5cf56e84eda7ee1a4653e00f1fe764a /src/view/com/profile/ProfileCard.tsx | |
parent | 10f613475adea292666f00879580c46741260e01 (diff) | |
download | voidsky-9084e0e4a8ba14c59ec2ee29f8035eb854d11e87.tar.zst |
Integrate profile listings into design system
Diffstat (limited to 'src/view/com/profile/ProfileCard.tsx')
-rw-r--r-- | src/view/com/profile/ProfileCard.tsx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/view/com/profile/ProfileCard.tsx b/src/view/com/profile/ProfileCard.tsx index 6ce5f29e5..5d1992b7a 100644 --- a/src/view/com/profile/ProfileCard.tsx +++ b/src/view/com/profile/ProfileCard.tsx @@ -3,26 +3,26 @@ import {StyleSheet, TouchableOpacity, View} from 'react-native' import {Link} from '../util/Link' import {Text} from '../util/text/Text' import {UserAvatar} from '../util/UserAvatar' -import {s, colors} from '../../lib/styles' +import {s} from '../../lib/styles' +import {usePalette} from '../../lib/hooks/usePalette' export function ProfileCard({ - did, handle, displayName, avatar, renderButton, onPressButton, }: { - did: string handle: string displayName?: string avatar?: string renderButton?: () => JSX.Element onPressButton?: () => void }) { + const pal = usePalette('default') return ( <Link - style={styles.outer} + style={[styles.outer, pal.view, pal.border]} href={`/profile/${handle}`} title={handle} noFeedback> @@ -36,16 +36,18 @@ export function ProfileCard({ /> </View> <View style={styles.layoutContent}> - <Text style={[s.f16, s.bold, s.black]} numberOfLines={1}> + <Text style={[s.bold, pal.text]} numberOfLines={1}> {displayName || handle} </Text> - <Text style={[s.f15, s.gray5]} numberOfLines={1}> + <Text type="body2" style={[pal.textLight]} numberOfLines={1}> @{handle} </Text> </View> {renderButton ? ( <View style={styles.layoutButton}> - <TouchableOpacity onPress={onPressButton} style={styles.btn}> + <TouchableOpacity + onPress={onPressButton} + style={[styles.btn, pal.btn]}> {renderButton()} </TouchableOpacity> </View> @@ -57,9 +59,7 @@ export function ProfileCard({ const styles = StyleSheet.create({ outer: { - marginTop: 1, - backgroundColor: colors.white, - borderRadius: 6, + borderTopWidth: 1, }, layout: { flexDirection: 'row', @@ -93,7 +93,6 @@ const styles = StyleSheet.create({ paddingVertical: 7, paddingHorizontal: 14, borderRadius: 50, - backgroundColor: colors.gray1, marginLeft: 6, }, }) |