diff --git a/README.md b/README.md index b1251ca..8a6e92a 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ [![npm](https://img.shields.io/npm/dt/express.svg)](https://www.npmjs.com/package/react-native-input-tags) [![npm version](https://badge.fury.io/js/react-native-input-tags.svg)](https://badge.fury.io/js/react-native-input-tags) +This project is inspired by [react-native-tags](https://www.npmjs.com/package/react-native-tags). + A React Native component that allows you to input text and formats the text into a tag when a space or comma is entered. Tapping on the tag will remove it. @@ -23,31 +25,26 @@ yarn add react-native-input-tags ## Usage -```jsx -import React from 'react'; -import { TouchableOpacity, Text } from 'react-native'; -import Tags from 'react-native-input-tags'; - -const MyTagInput = () => ( - console.log(tags)} - onTagPress={(index, tagLabel, event, deleted) => - console.log(index, tagLabel, event, deleted ? 'deleted' : 'not deleted') - } - containerStyle={{ justifyContent: 'center' }} - inputStyle={{ backgroundColor: 'white' }} - renderTag={({ tag, index, onPress, deleteTagOnPress, readonly }) => ( - - {tag} - - )} - /> -); +```tsx +import { Button, StyleSheet, Text, TextInput, View } from 'react-native'; +import InputTag, { useInputTag } from 'react-native-input-tags'; + +export default function App() { + const inputTag = useInputTag(); + return ( + + #Tags: + + +