Use individual images in emoji picker rather than a spritesheet
This commit is contained in:
parent
cc7b9da0cf
commit
dcf6a5f59c
5 changed files with 80 additions and 36 deletions
|
@ -28,12 +28,19 @@ function getImageTag({
|
|||
const result = getReplacementData(match[0], match[1], match[2]);
|
||||
|
||||
if (is.string(result)) {
|
||||
return <span key={key}>{match[0]}</span>;
|
||||
return match[0];
|
||||
}
|
||||
|
||||
const img = findImage(result.value, result.variation);
|
||||
const title = getTitle(result.value);
|
||||
|
||||
if (
|
||||
!img.path ||
|
||||
!img.path.startsWith('node_modules/emoji-datasource-apple')
|
||||
) {
|
||||
return match[0];
|
||||
}
|
||||
|
||||
return (
|
||||
// tslint:disable-next-line react-a11y-img-has-alt
|
||||
<img
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue