Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# React Native Emoticons
# React Native a2s Emoticons
react native emoticons component, including emoji

![emoticons](docs/emoticons.gif)
Expand All @@ -10,7 +10,7 @@ react native emoticons component, including emoji
## Install

```js
npm install react-native-emoticons
npm install react-native-a2s-emoticons
```

## Usage
Expand All @@ -22,7 +22,7 @@ npm install react-native-emoticons
Import the component package.

```js
import Emoticons from 'react-native-emoticons';
import Emoticons from 'react-native-a2s-emoticons';
```
- step 2

Expand Down Expand Up @@ -57,7 +57,7 @@ npm install react-native-emoticons
Import

```js
import * as emoticons from 'react-native-emoticons';
import * as emoticons from 'react-native-a2s-emoticons';
```

1. stringify
Expand Down Expand Up @@ -104,3 +104,5 @@ import * as emoticons from 'react-native-emoticons';
## Further

### Support custom emoticons like `weixin`

### Forked from [react-native-emoticons](https://github.com/xiewang/react-native-emoticons)
14 changes: 1 addition & 13 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ require('string.fromcodepoint');

const categories = ['People', 'Nature', 'Foods', 'Activity', 'Places', 'Objects', 'Symbols', 'Flags'];
const filters = ['white_frowning_face'];
const blockIconNum = 23;
const blockIconNum = 24;
let choiceness = ['grinning', 'grin', 'joy', 'sweat_smile', 'laughing', 'wink', 'blush', 'yum', 'heart_eyes', 'kissing_heart',
'kissing_smiling_eyes', 'stuck_out_tongue_winking_eye', 'sunglasses', 'smirk', 'unamused', 'thinking_face',
'flushed', 'rage', 'triumph', 'sob', 'mask', 'sleeping', 'zzz', 'hankey', 'ghost', '+1', '-1', 'facepunch', 'v',
Expand Down Expand Up @@ -240,18 +240,6 @@ class Emoticons extends React.Component {

})
}
{
(this.props.asyncRender && this.state.currentDotTab[this.state.currentMainTab] == i)
|| !this.props.asyncRender ? (<TouchableOpacity
onPress={()=>this._onBackspacePress()}
style={[styles.emojiTouch, styles.delete]}
>
<Image
resizeMode={'contain'}
style={styles.backspace}
source={require('./backspace.png')}/>
</TouchableOpacity>) : null
}


</View>
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "react-native-emoticons",
"version": "1.0.9",
"name": "react-native-a2s-emoticons",
"version": "1.1.1",
"description": "react native emoticons component",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/xiewang/react-native-emoticons.git"
"url": "https://github.com/App2Sales/react-native-emoticons"
},
"keywords": [
"react-native",
Expand All @@ -18,13 +18,14 @@
"author": "xiewang",
"license": "MIT",
"bugs": {
"url": "https://github.com/xiewang/react-native-emoticons/issues"
"url": "https://github.com/App2Sales/react-native-emoticons/issues"
},
"homepage": "https://github.com/xiewang/react-native-emoticons",
"homepage": "https://github.com/App2Sales/react-native-emoticons",
"dependencies": {
"emoji-datasource": "^2.4.4",
"lodash": "^4.17.4",
"react-native-scrollable-tab-view": "^0.6.7",
"react-native-scrollable-tab-view": "^0.10.0",
"create-react-class": "^15.6.3",
"string.fromcodepoint": "^0.2.1",
"react-native-fetch-blob": "^0.10.5",
"prop-types": "^15.5.10"
Expand Down
40 changes: 20 additions & 20 deletions style.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ const styles = StyleSheet.create({
backgroundColor: '#fff',
height: height,
width: width,
position: 'absolute',
bottom: 0,
left:0,
zIndex:1000
},
container: {
backgroundColor: '#fff',
height: 300,
height: 200,
width: width,
position: 'absolute',
bottom: 0,
left:0,
borderTopColor: '#9b9b9b',
borderTopWidth: 1
},
emoji: {
textAlign: 'center',
Expand All @@ -40,8 +40,8 @@ const styles = StyleSheet.create({
color: '#rgba(0,0,0,1)'
},
emojiTouch:{
width: (width-30)/6,
height: 50,
width: (width-30)/8,
height: 44,
justifyContent: 'center',
alignItems: 'center'
},
Expand All @@ -52,7 +52,7 @@ const styles = StyleSheet.create({
width: width
},
scrollGroupTable: {
paddingBottom: 50
paddingBottom: 40
},
cateView: {
flex: 1,
Expand All @@ -62,21 +62,21 @@ const styles = StyleSheet.create({
flexDirection: 'row',
justifyContent: 'space-between',
flexWrap: 'wrap',
paddingLeft: 15,
paddingRight: 15,
paddingTop: 15
paddingLeft: 8,
paddingRight: 8,
paddingTop: 8
},
tab: {
alignItems: 'center',
justifyContent: 'center',
paddingBottom: 0,
width: 60,
width: 42,
borderRightWidth: 1,
borderColor: 'rgba(178,178,178,.3)',
backgroundColor: '#fff'
},
tabs: {
height: 40,
height: 35,
width: width,
flexDirection: 'row',
borderWidth: 1,
Expand All @@ -87,27 +87,27 @@ const styles = StyleSheet.create({
backgroundColor: 'rgba(255,255,255,1)',
},
tabsDot: {
height: 40,
height: 8,
width: width,
flexDirection: 'row',
borderWidth: 0,
justifyContent: 'center',
alignItems: 'center'
},
tabDot: {
width: 10,
height: 10,
borderRadius: 5,
width: 6,
height: 6,
borderRadius: 3,
alignItems: 'center',
justifyContent: 'center',
marginLeft: 5,
marginRight: 5
marginLeft: 3,
marginRight: 3
},
dot: {
backgroundColor: '#f1f1f1',
width: 6,
height: 6,
borderRadius: 3,
width: 4,
height: 4,
borderRadius: 2,
},
backspace:{
width:30,
Expand Down
7 changes: 4 additions & 3 deletions tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
DeviceEventEmitter
} from 'react-native';
import styles from './style';
import PropTypes from 'prop-types';

class TabBar extends React.Component {
constructor(props) {
Expand All @@ -25,9 +26,9 @@ class TabBar extends React.Component {


static propTypes = {
goToPage: React.PropTypes.func,
activeTab: React.PropTypes.number,
tabs: React.PropTypes.array,
goToPage: PropTypes.func,
activeTab: PropTypes.number,
tabs: PropTypes.array,
};

componentDidMount() {
Expand Down