1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Using new text component

Need to use global accessibility checks rather than per text component which is not efficient
This commit is contained in:
Zhiyuan Zheng
2022-05-07 00:52:32 +02:00
parent 8caf315894
commit 7c48c61c99
60 changed files with 1302 additions and 1494 deletions

View File

@ -1,13 +1,13 @@
import Icon from '@components/Icon'
import RelativeTime from '@components/RelativeTime'
import CustomText from '@components/Text'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { Text } from 'react-native'
export interface Props {
created_at: Mastodon.Status['created_at']
created_at: Mastodon.Status['created_at'] | number
edited_at?: Mastodon.Status['edited_at']
}
@ -18,11 +18,9 @@ const HeaderSharedCreated = React.memo(
return (
<>
<Text
style={{ ...StyleConstants.FontStyle.S, color: colors.secondary }}
>
<CustomText fontStyle='S' style={{ color: colors.secondary }}>
<RelativeTime date={edited_at || created_at} />
</Text>
</CustomText>
{edited_at ? (
<Icon
accessibilityLabel={t(