1.0.3 • Published 6 years ago

react-native-talk-balloon v1.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

React Native Talk Balloon

This is a component of talk balloons for React Native.

N|Solid

Install

npm -i react-native-talk-balloon or yarn add react-native-talk-balloon

How to use

import TalkBalloon from "react-native-talk-balloon";

<TalkBalloon
  backgroundColor="#D6EAF8"
  borderColor="#000000"
  borderRadius={17}
  triangleSize={17}
  triangleOffSet="22%"
  onPress={() => {
    Alert.alert('Hello!', 'You Pressed Me.');
  }}>
    <Text>
      You Message Here :)
    </Text>
</TalkBalloon>

API

PropTypeDefaultDescription
triangleDirectionstringleftset the direction from triangle top/bottom/left/right.
triangleOffSetstring20%set percentage offset of triangle position from top or left .
triangleSizenumber10set the triangle size
borderColorstring#000000color of border
borderWidthnumber1width of border
containerStyleobjectnullset the style of balloon container.
onPressfunctionnulltriggered on pressed the talk balloon.
onLongPressfunctionnulltriggered on long pressed talk balloon.
borderRadiusnumber10radius of border
backgroundColorstring#FFFFFFcolor of background
widthnumber300width of talk balloon
heightnumber50height of talk balloon
childrennode<View />Content of <TalkBalloon />

Credits

This component is an improvement of the code from react-native-balloon, so I leave the creation credits to its creator.

License

npm.io