stop incorrectly using suffixtext (#8352)
This commit is contained in:
@@ -23,6 +23,7 @@ import * as TextField from '#/components/forms/TextField'
|
|||||||
import {InlineLinkText} from '#/components/Link'
|
import {InlineLinkText} from '#/components/Link'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
import * as Prompt from '#/components/Prompt'
|
import * as Prompt from '#/components/Prompt'
|
||||||
|
import {Text} from '#/components/Typography'
|
||||||
import {useSimpleVerificationState} from '#/components/verification'
|
import {useSimpleVerificationState} from '#/components/verification'
|
||||||
|
|
||||||
const DISPLAY_NAME_MAX_GRAPHEMES = 64
|
const DISPLAY_NAME_MAX_GRAPHEMES = 64
|
||||||
@@ -329,22 +330,18 @@ function DialogInner({
|
|||||||
/>
|
/>
|
||||||
</TextField.Root>
|
</TextField.Root>
|
||||||
{displayNameTooLong && (
|
{displayNameTooLong && (
|
||||||
<TextField.SuffixText
|
<Text
|
||||||
style={[
|
style={[
|
||||||
a.text_sm,
|
a.text_sm,
|
||||||
a.mt_xs,
|
a.mt_xs,
|
||||||
a.font_bold,
|
a.font_bold,
|
||||||
{color: t.palette.negative_400},
|
{color: t.palette.negative_400},
|
||||||
]}
|
]}>
|
||||||
label={_(msg`Display name is too long`)}>
|
<Plural
|
||||||
<Trans>
|
value={DISPLAY_NAME_MAX_GRAPHEMES}
|
||||||
Display name is too long.{' '}
|
other="Display name is too long. The maximum number of characters is #."
|
||||||
<Plural
|
/>
|
||||||
value={DISPLAY_NAME_MAX_GRAPHEMES}
|
</Text>
|
||||||
other="The maximum number of characters is #."
|
|
||||||
/>
|
|
||||||
</Trans>
|
|
||||||
</TextField.SuffixText>
|
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
@@ -379,22 +376,18 @@ function DialogInner({
|
|||||||
/>
|
/>
|
||||||
</TextField.Root>
|
</TextField.Root>
|
||||||
{descriptionTooLong && (
|
{descriptionTooLong && (
|
||||||
<TextField.SuffixText
|
<Text
|
||||||
style={[
|
style={[
|
||||||
a.text_sm,
|
a.text_sm,
|
||||||
a.mt_xs,
|
a.mt_xs,
|
||||||
a.font_bold,
|
a.font_bold,
|
||||||
{color: t.palette.negative_400},
|
{color: t.palette.negative_400},
|
||||||
]}
|
]}>
|
||||||
label={_(msg`Description is too long`)}>
|
<Plural
|
||||||
<Trans>
|
value={DESCRIPTION_MAX_GRAPHEMES}
|
||||||
Description is too long.{' '}
|
other="Description is too long. The maximum number of characters is #."
|
||||||
<Plural
|
/>
|
||||||
value={DESCRIPTION_MAX_GRAPHEMES}
|
</Text>
|
||||||
other="The maximum number of characters is #."
|
|
||||||
/>
|
|
||||||
</Trans>
|
|
||||||
</TextField.SuffixText>
|
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user