Skip to content

Commit

Permalink
Merge pull request #36 from GeekyAnts/development
Browse files Browse the repository at this point in the history
Input example update
  • Loading branch information
amars29 authored Feb 7, 2022
2 parents 3615a8c + ef47881 commit c24ba87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/nb/components/primitives/Input/Elements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Input, Icon, Stack } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons';

export const Example = () => {
const [show, setShow] = React.useState(false);
return (
<Stack space={4} w="100%" alignItems="center">
<Input
Expand All @@ -19,12 +20,14 @@ export const Example = () => {
/>
<Input
w={{ base: '75%', md: '25%' }}
type={show ? 'text' : 'password'}
InputRightElement={
<Icon
as={<MaterialIcons name="visibility-off" />}
as={<MaterialIcons name={show ? 'visibility' : 'visibility-off'} />}
size={5}
mr="2"
color="muted.400"
onPress={() => setShow(!show)}
/>
}
placeholder="Password"
Expand Down

0 comments on commit c24ba87

Please sign in to comment.