Skip to content

Commit 4521d39

Browse files
committed
Reactions: Remove reaction backgaound color
1 parent 669d8ee commit 4521d39

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "4.7.2",
2+
"version": "4.7.3",
33
"license": "MIT",
44
"main": "dist/index.js",
55
"typings": "dist/index.d.ts",

src/components/Reactions/BtnPlus.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ const styles = stylesheet.create({
4949
backgroundColor: 'var(--epr-hover-bg-color)',
5050
// @ts-ignore
5151
':after': {
52-
backgroundPositionY: '-20px'
52+
backgroundPositionY: '-20px',
53+
transform: 'scale(1.2)'
5354
}
5455
},
5556
':focus': {

src/components/Reactions/Reactions.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function Reactions() {
4040
unified={reaction}
4141
showVariations={false}
4242
className={cx(styles.emojiButton)}
43-
round
43+
noBackground
4444
/>
4545
</li>
4646
))}

src/components/emoji/ClickableEmojiButton.tsx

+13-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type ClickableEmojiButtonProps = Readonly<{
1717
children: React.ReactNode;
1818
hasVariations: boolean;
1919
unified?: string;
20-
round?: boolean;
20+
noBackground?: boolean;
2121
className?: string;
2222
}>;
2323

@@ -30,7 +30,7 @@ export function ClickableEmojiButton({
3030
hasVariations,
3131
children,
3232
className,
33-
round = false
33+
noBackground = false
3434
}: ClickableEmojiButtonProps) {
3535
return (
3636
<Button
@@ -42,7 +42,7 @@ export function ClickableEmojiButton({
4242
[ClassNames.visible]: !hidden && !hiddenOnSearch
4343
},
4444
!!(hasVariations && showVariations) && styles.hasVariations,
45-
round && styles.round,
45+
noBackground && styles.noBackground,
4646
className
4747
)}
4848
data-unified={unified}
@@ -76,8 +76,16 @@ const styles = stylesheet.create({
7676
backgroundColor: 'var(--epr-focus-bg-color)'
7777
}
7878
},
79-
round: {
80-
borderRadius: '50%'
79+
noBackground: {
80+
background: 'none',
81+
':hover': {
82+
backgroundColor: 'transparent',
83+
background: 'none'
84+
},
85+
':focus': {
86+
backgroundColor: 'transparent',
87+
background: 'none'
88+
}
8189
},
8290
hasVariations: {
8391
'.': ClassNames.emojiHasVariations,

src/components/emoji/Emoji.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type ClickableEmojiProps = Readonly<
1414
hiddenOnSearch?: boolean;
1515
emoji: DataEmoji;
1616
className?: string;
17-
round?: boolean;
17+
noBackground?: boolean;
1818
}
1919
>;
2020

@@ -29,7 +29,7 @@ export function ClickableEmoji({
2929
lazyLoad,
3030
getEmojiUrl,
3131
className,
32-
round = false
32+
noBackground = false
3333
}: ClickableEmojiProps) {
3434
const hasVariations = emojiHasVariations(emoji);
3535

@@ -41,7 +41,7 @@ export function ClickableEmoji({
4141
hiddenOnSearch={hiddenOnSearch}
4242
emojiNames={emojiNames(emoji)}
4343
unified={unified}
44-
round={round}
44+
noBackground={noBackground}
4545
>
4646
<ViewOnlyEmoji
4747
unified={unified}

0 commit comments

Comments
 (0)