Skip to content

Commit

Permalink
Merge pull request #2554 from fioprotocol/fix/ui2-create-wallet-name-…
Browse files Browse the repository at this point in the history
…field

Hide search icon prop for outlined field.
  • Loading branch information
thehobbit85 authored Apr 23, 2021
2 parents a9aa1c2 + 8a9e3f2 commit 4f8a050
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/scenes/CreateWalletNameScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export class CreateWalletName extends React.Component<Props, State> {
marginRem={[0, 1.75]}
ref={this.textInput}
blurOnSubmit
hideSearchIcon
/>
<SecondaryButton onPress={this.onNext} label={s.strings.string_next_capitalized} marginRem={[3, 6]} />
</SceneWrapper>
Expand Down
5 changes: 3 additions & 2 deletions src/components/themed/EdgeTextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type EdgeOutlinedTextFieldProps = {
marginRem?: number | number[],
isClearable: boolean,
small?: boolean,
hideSearchIcon?: boolean,
onClear: () => void
}

Expand Down Expand Up @@ -53,7 +54,7 @@ class EdgeTextFieldOutlinedComponent extends React.PureComponent<EdgeOutlinedTex
}

render() {
const { isClearable, marginRem = 0.5, small, theme, ...rest } = this.props
const { isClearable, marginRem = 0.5, small, theme, hideSearchIcon, ...rest } = this.props
const spacings = spacingStyles(marginRem, theme)
const styles = getStyles(theme)
const contentInset = small ? { input: theme.rem(0.75), label: 0 } : null
Expand All @@ -68,7 +69,7 @@ class EdgeTextFieldOutlinedComponent extends React.PureComponent<EdgeOutlinedTex
textColor={theme.primaryText}
tintColor={theme.textLink}
ref={this.props.fieldRef}
prefix={<AntDesignIcon name="search1" color={theme.iconDeactivated} size={theme.rem(1)} />}
prefix={hideSearchIcon ? null : <AntDesignIcon name="search1" color={theme.iconDeactivated} size={theme.rem(1)} />}
suffix={
isClearable && (
<TouchableOpacity onPress={this.clearText} style={styles.outlinedTextFieldClearContainer}>
Expand Down

0 comments on commit 4f8a050

Please sign in to comment.