Sticker Creator: Don't pop sticker preview over the close button

This commit is contained in:
Ken Powers 2020-03-09 17:15:16 -04:00 committed by Scott Nonnenberg
parent 31f219690a
commit 1f5cb9e8af

View file

@ -198,7 +198,14 @@ export const StickerFrame = React.memo(
/>
) : null}
{mode === 'removable' ? (
<button className={styles.closeButton} onClick={handleRemove}>
<button
className={styles.closeButton}
onClick={handleRemove}
// Reverse the mouseenter/leave logic for the remove button so
// we don't accidentally cover the remove button
onMouseEnter={handleMouseLeave}
onMouseLeave={handleMouseEnter}
>
{closeSvg}
</button>
) : null}