-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove disable emoji props and add custom style
- Loading branch information
Filipe Marins
committed
Apr 28, 2022
1 parent
680641c
commit 62e329e
Showing
5 changed files
with
22 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import React, { ReactElement, CSSProperties } from 'react'; | ||
import React, { ReactElement } from 'react'; | ||
|
||
import { getEmojiClassNameAndDataTitle } from '../lib/utils/renderEmoji'; | ||
|
||
type EmojiProps = { | ||
emojiHandle: string; // :emoji: | ||
style?: CSSProperties; | ||
className?: string; | ||
}; | ||
|
||
function Emoji({ emojiHandle, style }: EmojiProps): ReactElement { | ||
const { image: backgroundImage, ...emojiProps } = getEmojiClassNameAndDataTitle(emojiHandle); | ||
function Emoji({ emojiHandle, className }: EmojiProps): ReactElement { | ||
const { image: backgroundImage, className: emojiClassName, ...emojiProps } = getEmojiClassNameAndDataTitle(emojiHandle); | ||
|
||
return <span style={{ backgroundImage, ...style }} {...emojiProps} />; | ||
return <span style={{ backgroundImage }} className={`${emojiClassName} ${className || ''}`} {...emojiProps} />; | ||
} | ||
|
||
export default Emoji; |
19 changes: 4 additions & 15 deletions
19
apps/meteor/client/components/Message/MessageBodyRender/BigEmoji.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters