|
| 1 | +import React from 'react'; |
| 2 | +import Wrapper from '../../Wrapper'; |
| 3 | +import { Input, VStack, Icon, SearchIcon } from '../../../ui-components'; |
| 4 | + |
| 5 | +const InputStory = ({ ...props }: any) => { |
| 6 | + const [value, setValue] = React.useState(''); |
| 7 | + |
| 8 | + return ( |
| 9 | + <Wrapper> |
| 10 | + <VStack |
| 11 | + justifyContent="center" |
| 12 | + w="50%" |
| 13 | + alignItems="center" |
| 14 | + h={300} |
| 15 | + space="md" |
| 16 | + > |
| 17 | + <Input {...props} size="sm"> |
| 18 | + <Input.Input |
| 19 | + onChange={(e: any) => { |
| 20 | + setValue(e.nativeEvent.text); |
| 21 | + }} |
| 22 | + value={value} |
| 23 | + placeholder="Enter Text here" |
| 24 | + /> |
| 25 | + <Input.Icon pr="$4"> |
| 26 | + <Icon as={SearchIcon} /> |
| 27 | + </Input.Icon> |
| 28 | + </Input> |
| 29 | + |
| 30 | + <Input {...props} size="md"> |
| 31 | + <Input.Input |
| 32 | + onChange={(e: any) => { |
| 33 | + setValue(e.nativeEvent.text); |
| 34 | + }} |
| 35 | + value={value} |
| 36 | + placeholder="Enter Text here" |
| 37 | + /> |
| 38 | + <Input.Icon pr="$4"> |
| 39 | + <Icon as={SearchIcon} /> |
| 40 | + </Input.Icon> |
| 41 | + </Input> |
| 42 | + |
| 43 | + <Input {...props} size="lg" isDisabled> |
| 44 | + <Input.Input |
| 45 | + onChange={(e: any) => { |
| 46 | + setValue(e.nativeEvent.text); |
| 47 | + }} |
| 48 | + value={value} |
| 49 | + placeholder="Enter Text here" |
| 50 | + /> |
| 51 | + <Input.Icon pr="$4"> |
| 52 | + <Icon as={SearchIcon} /> |
| 53 | + </Input.Icon> |
| 54 | + </Input> |
| 55 | + |
| 56 | + <Input {...props} size="xl" isInvalid> |
| 57 | + <Input.Input |
| 58 | + onChange={(e: any) => { |
| 59 | + setValue(e.nativeEvent.text); |
| 60 | + }} |
| 61 | + value={value} |
| 62 | + placeholder="Enter Text here" |
| 63 | + /> |
| 64 | + <Input.Icon pr="$4"> |
| 65 | + <Icon as={SearchIcon} /> |
| 66 | + </Input.Icon> |
| 67 | + </Input> |
| 68 | + </VStack> |
| 69 | + </Wrapper> |
| 70 | + ); |
| 71 | +}; |
| 72 | + |
| 73 | +export { InputStory, Input, VStack, Icon, SearchIcon }; |
0 commit comments