tweak input
This commit is contained in:
@@ -25,7 +25,7 @@ import {useSignupContext} from '#/screens/Signup/state'
|
|||||||
import {atoms as a, platform, tokens, useTheme, web} from '#/alf'
|
import {atoms as a, platform, tokens, useTheme, web} from '#/alf'
|
||||||
import * as TextField from '#/components/forms/TextField'
|
import * as TextField from '#/components/forms/TextField'
|
||||||
import {useThrottledValue} from '#/components/hooks/useThrottledValue'
|
import {useThrottledValue} from '#/components/hooks/useThrottledValue'
|
||||||
import {At_Stroke2_Corner0_Rounded as At} from '#/components/icons/At'
|
import {At_Stroke2_Corner0_Rounded as AtIcon} from '#/components/icons/At'
|
||||||
import {Circle_Stroke2_Corner0_Rounded as CircleIcon} from '#/components/icons/Circle'
|
import {Circle_Stroke2_Corner0_Rounded as CircleIcon} from '#/components/icons/Circle'
|
||||||
import {CircleCheck_Stroke2_Corner0_Rounded as CircleCheckIcon} from '#/components/icons/CircleCheck'
|
import {CircleCheck_Stroke2_Corner0_Rounded as CircleCheckIcon} from '#/components/icons/CircleCheck'
|
||||||
import {CircleX_Stroke2_Corner0_Rounded as CircleXIcon} from '#/components/icons/CircleX'
|
import {CircleX_Stroke2_Corner0_Rounded as CircleXIcon} from '#/components/icons/CircleX'
|
||||||
@@ -132,27 +132,21 @@ export function StepHandle() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScreenTransition>
|
<ScreenTransition>
|
||||||
<View style={[a.gap_lg]}>
|
<View style={[a.gap_lg, a.pt_lg]}>
|
||||||
<Text style={[a.text_sm]}>
|
|
||||||
<Trans>This can be changed at any time.</Trans>
|
|
||||||
</Text>
|
|
||||||
<View>
|
<View>
|
||||||
<TextField.LabelText>
|
|
||||||
<Trans>Username</Trans>
|
|
||||||
</TextField.LabelText>
|
|
||||||
<TextField.Root>
|
<TextField.Root>
|
||||||
<TextField.Icon icon={At} />
|
<TextField.Icon icon={AtIcon} />
|
||||||
<TextField.Input
|
<TextField.Input
|
||||||
testID="handleInput"
|
testID="handleInput"
|
||||||
onChangeText={val => {
|
onChangeText={val => {
|
||||||
if (state.error) {
|
if (state.error) {
|
||||||
dispatch({type: 'setError', value: ''})
|
dispatch({type: 'setError', value: ''})
|
||||||
}
|
}
|
||||||
// replace em dash with double hyphen to fix iOS behaviour
|
setDraftValue(val)
|
||||||
setDraftValue(val.replaceAll('—', '--'))
|
|
||||||
}}
|
}}
|
||||||
label={`alice${state.userDomain}`}
|
label={state.userDomain}
|
||||||
defaultValue={draftValue}
|
defaultValue={draftValue}
|
||||||
|
keyboardType="ascii-capable" // fix for iOS replacing -- with —
|
||||||
autoCapitalize="none"
|
autoCapitalize="none"
|
||||||
autoCorrect={false}
|
autoCorrect={false}
|
||||||
autoFocus
|
autoFocus
|
||||||
|
|||||||
Reference in New Issue
Block a user