1.0.0 • Published 2 years ago

@rn-base/input-filter v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@rn-base/input-filter

react-native filter input

Installation

npm install @rn-base/input-filter

Usage

import { Box, Text } from '@rn-base/element';
import InputFilter, { InputFilterConstants } from '@rn-base/input-filter';

<Box flex={1} center middle>
  <InputFilter
    filters={[
      { text: 'abcbcc', type: InputFilterConstants.character },
      {
        text: '[^0-9]',
        type: InputFilterConstants.regex,
      },
    ]}
    style={{ width: 100, backgroundColor: 'red' }}
    onChangeText={value => setText(value)}
  />

  <Text size={20}>{text}</Text>
</Box>;

Props

  • filters: Array
    • text: regex or Array
    • type: view InputFilterConstants
    • inverted (suport IOS and InputFilterConstants.character)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

1.0.0

2 years ago

1.0.0-alpha.1

2 years ago

1.0.0-alpha.0

2 years ago

0.1.10

2 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago