[#138343455] Allow picker to display emoji natively rather than from spritesheet
Signed-off-by: Eric Dattore <edattore@pivotal.io>release
parent
82759ecd00
commit
8e6c393ab7
|
@ -53,8 +53,7 @@
|
|||
"build:example": "node scripts/build-example",
|
||||
"build:dist": "node scripts/build-dist",
|
||||
"build": "npm run build:data && npm run build:example && npm run build:dist",
|
||||
"watch:example": "node scripts/watch-example",
|
||||
"watch": "npm run watch:example",
|
||||
"watch": "node scripts/watch",
|
||||
"react:clean": "rimraf node_modules/{react,react-dom,react-addons-test-utils}",
|
||||
"react:14": "npm run react:clean && npm i react@^0.14 react-dom@^0.14 react-addons-test-utils@^0.14 --save-dev",
|
||||
"react:15": "npm run react:clean && npm i react@^15 react-dom@^15 react-addons-test-utils@^15 --save-dev",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
var path = require('path')
|
||||
var webpack = require('webpack')
|
||||
|
||||
var config = require('../example/webpack.config.js'),
|
||||
var config = require('../src/webpack.config.js'),
|
||||
compiler = webpack(config)
|
||||
|
||||
compiler.watch({}, (err, stats) => {
|
|
@ -261,7 +261,7 @@ export default class Picker extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
var { perLine, emojiSize, set, sheetSize, style, title, emoji, color, backgroundImageFn, emojisToShowFilter } = this.props,
|
||||
var { perLine, emojiSize, set, sheetSize, style, title, emoji, color, backgroundImageFn, emojisToShowFilter, displayNative } = this.props,
|
||||
{ skin } = this.state,
|
||||
width = (perLine * (emojiSize + 12)) + 12 + 2
|
||||
|
||||
|
@ -294,6 +294,7 @@ export default class Picker extends React.Component {
|
|||
hasStickyPosition={this.hasStickyPosition}
|
||||
i18n={this.i18n}
|
||||
emojiProps={{
|
||||
native: displayNative,
|
||||
skin: skin,
|
||||
size: emojiSize,
|
||||
set: set,
|
||||
|
@ -313,6 +314,7 @@ export default class Picker extends React.Component {
|
|||
title={title}
|
||||
emoji={emoji}
|
||||
emojiProps={{
|
||||
native: displayNative,
|
||||
size: 38,
|
||||
skin: skin,
|
||||
set: set,
|
||||
|
@ -343,6 +345,7 @@ Picker.propTypes = {
|
|||
skin: Emoji.propTypes.skin,
|
||||
sheetSize: Emoji.propTypes.sheetSize,
|
||||
emojisToShowFilter: React.PropTypes.func,
|
||||
displayNative: React.PropTypes.bool,
|
||||
}
|
||||
|
||||
Picker.defaultProps = {
|
||||
|
@ -359,4 +362,5 @@ Picker.defaultProps = {
|
|||
sheetSize: Emoji.defaultProps.sheetSize,
|
||||
backgroundImageFn: Emoji.defaultProps.backgroundImageFn,
|
||||
emojisToShowFilter: (codePoint) => true,
|
||||
displayNative: false,
|
||||
}
|
||||
|
|
|
@ -2155,7 +2155,7 @@ regenerator-transform@0.9.8:
|
|||
|
||||
regex-cache@^0.4.2:
|
||||
version "0.4.3"
|
||||
resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145"
|
||||
resolved "http://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145"
|
||||
dependencies:
|
||||
is-equal-shallow "^0.1.3"
|
||||
is-primitive "^2.0.0"
|
||||
|
|
Loading…
Reference in New Issue