-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
added ToucableOpacity to icon #184
base: dev
Are you sure you want to change the base?
Conversation
Hi @DanishWajid ! Input already has a "pressable right icon" used for password visibility. You could modify the component so it could accept TouchableOpacity on all icons used on the right side only if the user wants that. A prop for verifying what the user wants could be called "rightIconClick". Thanks, |
Hi Petru, currently the component used for password is separate one. while
the left and right icon is separate.
const viewPassElement = password && viewPass && (
<TouchableOpacity style={{ marginLeft: 2 }} onPress={() => setIsPassword(!
isPassword)}>
<Icon
size={iconSize || theme.SIZES.BASE * 1.0625}
color={iconColor || theme.COLORS.BLACK}
name="eye"
family="entypo"
/>
</TouchableOpacity> );
While the component used for the right icon is
const iconInstance = icon ? (
<Icon
name={icon}
family={family}
size={iconSize || theme.SIZES.BASE * 1.0625}
style={{ marginRight: left && !right ? theme.SIZES.BASE * 0.2 : 0 }}
color={iconColor || placeholderTextColor || theme.COLORS.PLACEHOLDER}
/>
) : (
iconContent
);
Now, what do you want me to modify the viewPassElement or iconInstance?
Regards, Danish Wajid
…On Thu, Feb 6, 2020 at 8:19 PM Petru Alin Gheorghe ***@***.***> wrote:
Hi @DanishWajid <https://github.com/DanishWajid> ! Input already has a
"pressable right icon" used for password visibility. You could modify the
component so it could accept TouchableOpacity on all icons used on the
right side only if the user wants that. A prop for verifying what the user
wants could be called "rightIconClick".
Thanks,
Alin
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#184?email_source=notifications&email_token=AIIVYGRQA4RISJLMTFXRLULRBQS6XA5CNFSM4KPDMC3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK7SZ4I#issuecomment-582954225>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIIVYGVPLME4ZUVIKVECXSDRBQS6XANCNFSM4KPDMC3A>
.
|
I know their different but duplicate code isn't helping. Being the fact that both icons are on the right side of the input you could re-write the component in a way much cleaner and helpful for future releases. You could actually have the option to make any icon pressable. Edit: Please read our Wiki and our CONTRIBUTING files. The PR should be for our |
Ok Sure, I will do it.
…On Fri, Feb 7, 2020 at 12:56 PM Petru Alin Gheorghe < ***@***.***> wrote:
I know their different but duplicate code isn't helping. Being the fact
that both icons are on the right side of the input you could re-write the
component in a way much cleaner and helpful for future releases. You could
actually have the option to make any icon pressable.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#184?email_source=notifications&email_token=AIIVYGRNWCI7GSBKABFZU7DRBUH2FA5CNFSM4KPDMC3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELCBMHA#issuecomment-583276060>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIIVYGRMKOG6Z7RBWGPVIY3RBUH2FANCNFSM4KPDMC3A>
.
|
In case like search bar you need input icon to be pressable