-
Couldn't load subscription status.
- Fork 275
Add target-ability to 'Next' button in select crypto scene #4256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -202,19 +202,20 @@ const CreateWalletSelectCryptoComponent = (props: Props) => { | |
|
|
||
| const renderCreateWalletRow: ListRenderItem<WalletCreateItem> = useHandler(item => { | ||
| const { key, displayName, pluginId, tokenId } = item.item | ||
|
|
||
| const value = selectedItems[key] | ||
| const accessibilityHint = sprintf(lstrings.create_wallet_hint, displayName) | ||
| const accessibilityState = { checked: value, selected: value } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is |
||
| const toggle = ( | ||
| <Switch | ||
| accessibilityState={accessibilityState} | ||
| accessibilityRole="switch" | ||
| accessibilityState={{ selected: selectedItems[key] }} | ||
| accessibilityHint={accessibilityHint} | ||
| ios_backgroundColor={theme.toggleButtonOff} | ||
| trackColor={{ | ||
| false: theme.toggleButtonOff, | ||
| true: theme.toggleButton | ||
| }} | ||
| value={selectedItems[key]} | ||
| value={value} | ||
| onValueChange={() => handleCreateWalletToggle(key)} | ||
| /> | ||
| ) | ||
|
|
@@ -223,6 +224,7 @@ const CreateWalletSelectCryptoComponent = (props: Props) => { | |
| <CreateWalletSelectCryptoRow | ||
| pluginId={pluginId} | ||
| tokenId={tokenId} | ||
| key={displayName} | ||
| walletName={displayName} | ||
| onPress={() => handleCreateWalletToggle(key)} | ||
| rightSide={toggle} | ||
|
|
@@ -235,12 +237,10 @@ const CreateWalletSelectCryptoComponent = (props: Props) => { | |
| const renderNextButton = React.useMemo( | ||
| () => ( | ||
| <Fade noFadeIn={defaultSelection.length > 0} visible={numSelected > 0} duration={300}> | ||
| <View style={styles.bottomButton}> | ||
| <MainButton label={lstrings.string_next_capitalized} type="primary" marginRem={[0, -0.5]} onPress={handleNext} alignSelf="center" /> | ||
| </View> | ||
| <MainButton label={lstrings.string_next_capitalized} type="primary" marginRem={[0, -0.5]} onPress={handleNext} alignSelf="center" /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This appears to be a non-functional cleanup. If that's the case it should be in a separate commit at the beginning |
||
| </Fade> | ||
| ), | ||
| [defaultSelection, handleNext, numSelected, styles.bottomButton] | ||
| [defaultSelection, handleNext, numSelected] | ||
| ) | ||
|
|
||
| return ( | ||
|
|
@@ -273,18 +273,18 @@ const CreateWalletSelectCryptoComponent = (props: Props) => { | |
| keyExtractor={keyExtractor} | ||
| renderItem={renderCreateWalletRow} | ||
| /> | ||
| {renderNextButton} | ||
| <View style={styles.bottomArea}>{renderNextButton}</View> | ||
| </View> | ||
| )} | ||
| </SceneWrapper> | ||
| ) | ||
| } | ||
|
|
||
| const getStyles = cacheStyles((theme: Theme) => ({ | ||
| bottomButton: { | ||
| alignSelf: 'center', | ||
| bottom: theme.rem(1), | ||
| position: 'absolute' | ||
| bottomArea: { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. were these changes tested with the keyboard visible? |
||
| flex: 1, | ||
| justifyContent: 'flex-end', | ||
| paddingBottom: theme.rem(1) | ||
| }, | ||
| content: { | ||
| flex: 1 | ||
|
|
||