missive / emoji-mart

🏪 One component to pick them all
https://missiveapp.com/open/emoji-mart
MIT License
8.59k stars 827 forks source link

through emoji.native get the expression is black border #465

Closed MeiJunNa closed 3 years ago

MeiJunNa commented 3 years ago

I still didn't understand how to solve this problem, throughemoji.native get the expression is still black border. Can you be more specific?

import './App.css'; import React, { Component } from 'react' import 'emoji-mart/css/emoji-mart.css' import { Picker } from 'emoji-mart' import { Input } from 'antd'; import "antd/dist/antd.css"; import { SmileOutlined } from '@ant-design/icons'; import from "lodash" class App extends Component { constructor(props) { super(props); this.state = { chatContent: "", showEmojiModal:false } } onChatContentChange = (value) => { this.setState({ chatContent: value }) }; searchEmoji(emoji, event) { console.log("emoji=====", emoji) emoji.unified="google"; this.setState({ emoji: emoji, showEmojiModal: false }) let { chatContent } = this.state; chatContent = !.isEmpty(chatContent) ? (chatContent + emoji.native) : emoji.native; this.setState({ chatContent }); } render() { return (

{this.state.showEmojiModal&&this.searchEmoji(emoji, event)}/>}
this.setState({ showEmojiModal: !this.state.showEmojiModal })}>
    <div style={{ display: 'flex', flex: 1, alignItems: 'center', paddingLeft: 10, paddingRight: 10, paddingBottom: 10 }}>
      <Input.TextArea
        style={{ display: 'flex', flex: 1, height: '100%', boxShadow: "none", fontSize: 16 }}
        placeholder="..."
        value={this.state.chatContent}
        onPressEnter={e => { }}
        onKeyUp={this.onKeyUp}
        onChange={e => this.onChatContentChange(e.target.value)}
      />
    </div>
  </div>
);

} }

export default App;

Originally posted by @MeiJunNa in https://github.com/missive/emoji-mart/issues/373#issuecomment-733559750

EtienneLem commented 3 years ago

You probably need to add this to your own CSS:

input, textarea {
  font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji";
}

Don’t forget to include your own font-family in there as well, the one you already use.

MeiJunNa commented 3 years ago

I have added the following code, but it still has no effect input, textarea { font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji", -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif!important ; }