forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1import {View} from 'react-native'
2
3import {atoms as a, useTheme} from '#/alf'
4import * as Skele from '#/components/Skeleton'
5import {Text} from '#/components/Typography'
6import * as SettingsList from '../../components/SettingsList'
7
8export function ItemTextWithSubtitle({
9 titleText,
10 subtitleText,
11 bold = false,
12 showSkeleton = false,
13}: {
14 titleText: React.ReactNode
15 subtitleText: React.ReactNode
16 bold?: boolean
17 showSkeleton?: boolean
18}) {
19 const t = useTheme()
20 return (
21 <View style={[a.flex_1, bold ? a.gap_xs : a.gap_2xs]}>
22 <SettingsList.ItemText style={bold && [a.font_semi_bold, a.text_lg]}>
23 {titleText}
24 </SettingsList.ItemText>
25 {showSkeleton ? (
26 <Skele.Text style={[a.text_sm, {width: 120}]} />
27 ) : (
28 <Text style={[a.text_sm, t.atoms.text_contrast_medium, a.leading_snug]}>
29 {subtitleText}
30 </Text>
31 )}
32 </View>
33 )
34}