@@ -17,6 +17,7 @@ type Props = $ReadOnly<{|
17
17
| } ,
18
18
19
19
title : LocalizableReactText ,
20
+ subtitle ? : LocalizableReactText ,
20
21
21
22
// TODO: Should we make this unconfigurable? Should we have two reusable
22
23
// components, with and without this?
@@ -33,7 +34,7 @@ type Props = $ReadOnly<{|
33
34
* selectable option row instead, use `SelectableOptionRow`.
34
35
*/
35
36
export default function NestedNavRow ( props : Props ) : Node {
36
- const { title, titleBoldUppercase, onPress, icon } = props ;
37
+ const { title, subtitle , titleBoldUppercase, onPress, icon } = props ;
37
38
38
39
const themeContext = useContext ( ThemeContext ) ;
39
40
@@ -55,9 +56,16 @@ export default function NestedNavRow(props: Props): Node {
55
56
marginRight : 8 ,
56
57
color : icon ?. color ?? themeContext . color ,
57
58
} ,
59
+ textWrapper : {
60
+ flex : 1 ,
61
+ } ,
58
62
title : {
59
63
...( titleBoldUppercase ? { textTransform : 'uppercase' , fontWeight : '500' } : undefined ) ,
60
64
} ,
65
+ subtitle : {
66
+ fontWeight : '300' ,
67
+ fontSize : 13 ,
68
+ } ,
61
69
iconRightFacingArrow : {
62
70
textAlign : 'center' ,
63
71
marginLeft : 8 ,
@@ -71,7 +79,10 @@ export default function NestedNavRow(props: Props): Node {
71
79
< Touchable onPress = { onPress } >
72
80
< View style = { styles . container } >
73
81
{ ! ! icon && < icon . Component size = { 24 } style = { styles . iconFromProps } /> }
74
- < ZulipTextIntl style = { styles . title } text = { title } />
82
+ < View style = { styles . textWrapper } >
83
+ < ZulipTextIntl style = { styles . title } text = { title } />
84
+ { subtitle !== undefined && < ZulipTextIntl style = { styles . subtitle } text = { subtitle } /> }
85
+ </ View >
75
86
< View style = { globalStyles . rightItem } >
76
87
< IconRight size = { 24 } style = { styles . iconRightFacingArrow } />
77
88
</ View >
0 commit comments