emoji-picker-react 4.7.1 → 4.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.7.1",
2
+ "version": "4.7.3",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -49,7 +49,8 @@ const styles = stylesheet.create({
49
49
  backgroundColor: 'var(--epr-hover-bg-color)',
50
50
  // @ts-ignore
51
51
  ':after': {
52
- backgroundPositionY: '-20px'
52
+ backgroundPositionY: '-20px',
53
+ transform: 'scale(1.2)'
53
54
  }
54
55
  },
55
56
  ':focus': {
@@ -39,7 +39,8 @@ export function Reactions() {
39
39
  emojiStyle={emojiStyle}
40
40
  unified={reaction}
41
41
  showVariations={false}
42
- round
42
+ className={cx(styles.emojiButton)}
43
+ noBackground
43
44
  />
44
45
  </li>
45
46
  ))}
@@ -59,5 +60,12 @@ const styles = stylesheet.create({
59
60
  justifyContent: 'space-between',
60
61
  alignItems: 'center',
61
62
  height: '100%'
63
+ },
64
+ emojiButton: {
65
+ ':hover': {
66
+ transform: 'scale(1.2)'
67
+ },
68
+
69
+ transition: 'transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.5)'
62
70
  }
63
71
  });
@@ -17,7 +17,8 @@ type ClickableEmojiButtonProps = Readonly<{
17
17
  children: React.ReactNode;
18
18
  hasVariations: boolean;
19
19
  unified?: string;
20
- round?: boolean;
20
+ noBackground?: boolean;
21
+ className?: string;
21
22
  }>;
22
23
 
23
24
  export function ClickableEmojiButton({
@@ -28,7 +29,8 @@ export function ClickableEmojiButton({
28
29
  showVariations = true,
29
30
  hasVariations,
30
31
  children,
31
- round = false
32
+ className,
33
+ noBackground = false
32
34
  }: ClickableEmojiButtonProps) {
33
35
  return (
34
36
  <Button
@@ -40,7 +42,8 @@ export function ClickableEmojiButton({
40
42
  [ClassNames.visible]: !hidden && !hiddenOnSearch
41
43
  },
42
44
  !!(hasVariations && showVariations) && styles.hasVariations,
43
- round && styles.round
45
+ noBackground && styles.noBackground,
46
+ className
44
47
  )}
45
48
  data-unified={unified}
46
49
  aria-label={emojiNames[0]}
@@ -73,8 +76,16 @@ const styles = stylesheet.create({
73
76
  backgroundColor: 'var(--epr-focus-bg-color)'
74
77
  }
75
78
  },
76
- round: {
77
- 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
+ }
78
89
  },
79
90
  hasVariations: {
80
91
  '.': ClassNames.emojiHasVariations,
@@ -14,7 +14,7 @@ type ClickableEmojiProps = Readonly<
14
14
  hiddenOnSearch?: boolean;
15
15
  emoji: DataEmoji;
16
16
  className?: string;
17
- round?: boolean;
17
+ noBackground?: boolean;
18
18
  }
19
19
  >;
20
20
 
@@ -28,7 +28,8 @@ export function ClickableEmoji({
28
28
  size,
29
29
  lazyLoad,
30
30
  getEmojiUrl,
31
- round = false
31
+ className,
32
+ noBackground = false
32
33
  }: ClickableEmojiProps) {
33
34
  const hasVariations = emojiHasVariations(emoji);
34
35
 
@@ -40,7 +41,7 @@ export function ClickableEmoji({
40
41
  hiddenOnSearch={hiddenOnSearch}
41
42
  emojiNames={emojiNames(emoji)}
42
43
  unified={unified}
43
- round={round}
44
+ noBackground={noBackground}
44
45
  >
45
46
  <ViewOnlyEmoji
46
47
  unified={unified}
@@ -49,6 +50,7 @@ export function ClickableEmoji({
49
50
  emojiStyle={emojiStyle}
50
51
  lazyLoad={lazyLoad}
51
52
  getEmojiUrl={getEmojiUrl}
53
+ className={className}
52
54
  />
53
55
  </ClickableEmojiButton>
54
56
  );