Add dataSet to new Text comp, wrap metrics parents
This commit is contained in:
@@ -237,7 +237,7 @@ export function Link({
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type InlineLinkProps = React.PropsWithChildren<
|
export type InlineLinkProps = React.PropsWithChildren<
|
||||||
BaseLinkProps & TextStyleProp & Pick<TextProps, 'selectable'>
|
BaseLinkProps & TextStyleProp & Pick<TextProps, 'selectable' | 'dataSet'>
|
||||||
> &
|
> &
|
||||||
Pick<ButtonProps, 'label'> & {
|
Pick<ButtonProps, 'label'> & {
|
||||||
disableUnderline?: boolean
|
disableUnderline?: boolean
|
||||||
@@ -317,6 +317,7 @@ export function InlineLinkText({
|
|||||||
dataSet: {
|
dataSet: {
|
||||||
// default to no underline, apply this ourselves
|
// default to no underline, apply this ourselves
|
||||||
noUnderline: '1',
|
noUnderline: '1',
|
||||||
|
...(rest.dataSet || {}),
|
||||||
},
|
},
|
||||||
})}>
|
})}>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -45,12 +45,9 @@ export function ProfileHeaderMetrics({
|
|||||||
testID="profileHeaderFollowersButton"
|
testID="profileHeaderFollowersButton"
|
||||||
style={[a.flex_row, t.atoms.text]}
|
style={[a.flex_row, t.atoms.text]}
|
||||||
to={makeProfileLink(profile, 'followers')}
|
to={makeProfileLink(profile, 'followers')}
|
||||||
label={`${followers} ${pluralizedFollowers}`}>
|
label={`${followers} ${pluralizedFollowers}`}
|
||||||
<Text
|
dataSet={tooltipFormattedCountIfNeeded(profile.followersCount || 0)}>
|
||||||
style={[a.font_bold, a.text_md]}
|
<Text style={[a.font_bold, a.text_md]}>{followers} </Text>
|
||||||
dataSet={tooltipFormattedCountIfNeeded(profile.followersCount || 0)}>
|
|
||||||
{followers}{' '}
|
|
||||||
</Text>
|
|
||||||
<Text style={[t.atoms.text_contrast_medium, a.text_md]}>
|
<Text style={[t.atoms.text_contrast_medium, a.text_md]}>
|
||||||
{pluralizedFollowers}
|
{pluralizedFollowers}
|
||||||
</Text>
|
</Text>
|
||||||
@@ -59,20 +56,15 @@ export function ProfileHeaderMetrics({
|
|||||||
testID="profileHeaderFollowsButton"
|
testID="profileHeaderFollowsButton"
|
||||||
style={[a.flex_row, t.atoms.text]}
|
style={[a.flex_row, t.atoms.text]}
|
||||||
to={makeProfileLink(profile, 'follows')}
|
to={makeProfileLink(profile, 'follows')}
|
||||||
label={_(msg`${following} following`)}>
|
label={_(msg`${following} following`)}
|
||||||
<Text
|
dataSet={tooltipFormattedCountIfNeeded(profile.followsCount || 0)}>
|
||||||
style={[a.font_bold, a.text_md]}
|
<Text style={[a.font_bold, a.text_md]}>{following} </Text>
|
||||||
dataSet={tooltipFormattedCountIfNeeded(profile.followsCount || 0)}>
|
|
||||||
{following}{' '}
|
|
||||||
</Text>
|
|
||||||
<Text style={[t.atoms.text_contrast_medium, a.text_md]}>
|
<Text style={[t.atoms.text_contrast_medium, a.text_md]}>
|
||||||
{pluralizedFollowings}
|
{pluralizedFollowings}
|
||||||
</Text>
|
</Text>
|
||||||
</InlineLinkText>
|
</InlineLinkText>
|
||||||
<Text>
|
<Text dataSet={tooltipFormattedCountIfNeeded(profile.postsCount || 0)}>
|
||||||
<Text
|
<Text style={[a.font_bold, t.atoms.text, a.text_md]}>
|
||||||
style={[a.font_bold, t.atoms.text, a.text_md]}
|
|
||||||
dataSet={tooltipFormattedCountIfNeeded(profile.postsCount || 0)}>
|
|
||||||
{formatCount(i18n, profile.postsCount || 0)}{' '}
|
{formatCount(i18n, profile.postsCount || 0)}{' '}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={[t.atoms.text_contrast_medium, a.font_normal, a.text_md]}>
|
<Text style={[t.atoms.text_contrast_medium, a.font_normal, a.text_md]}>
|
||||||
|
|||||||
Reference in New Issue
Block a user