Zoom-in gifts on hover
This commit is contained in:
parent
e77c6c40f8
commit
4487370790
@ -147,7 +147,7 @@ const SavedGift = ({
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={buildClassName(styles.root, 'scroll-item')}
|
||||
className={buildClassName('interactive-gift scroll-item', styles.root)}
|
||||
style={style}
|
||||
onClick={handleClick}
|
||||
onContextMenu={handleContextMenu}
|
||||
|
||||
@ -31,9 +31,6 @@
|
||||
|
||||
.stickerWrapper {
|
||||
position: relative;
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
width: 7.5rem;
|
||||
height: 7.5rem;
|
||||
margin-block: 0.5rem;
|
||||
|
||||
@ -3,6 +3,7 @@ import { memo, useRef } from '@teact';
|
||||
import type { ApiStarGiftUnique } from '../../../api/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../../util/browser/windowEnvironment.ts';
|
||||
import buildClassName from '../../../util/buildClassName.ts';
|
||||
import { getGiftAttributes } from '../../common/helpers/gifts';
|
||||
|
||||
import useFlag from '../../../hooks/useFlag.ts';
|
||||
@ -39,7 +40,7 @@ const WebPageUniqueGift = ({
|
||||
|
||||
return (
|
||||
<div
|
||||
className={styles.root}
|
||||
className={buildClassName('interactive-gift', styles.root)}
|
||||
onClick={onClick}
|
||||
onMouseEnter={!IS_TOUCH_ENV ? markHover : undefined}
|
||||
onMouseLeave={!IS_TOUCH_ENV ? unmarkHover : undefined}
|
||||
|
||||
@ -123,7 +123,7 @@ const StarGiftAction = ({
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={buildClassName(styles.contentBox, styles.starGift)}
|
||||
className={buildClassName('interactive-gift', styles.contentBox, styles.starGift)}
|
||||
tabIndex={0}
|
||||
role="button"
|
||||
onClick={onClick}
|
||||
|
||||
@ -85,7 +85,7 @@ const StarGiftAction = ({
|
||||
|
||||
return (
|
||||
<div
|
||||
className={buildClassName(styles.contentBox, styles.starGift, styles.uniqueGift)}
|
||||
className={buildClassName('interactive-gift', styles.contentBox, styles.starGift, styles.uniqueGift)}
|
||||
tabIndex={0}
|
||||
role="button"
|
||||
onClick={onClick}
|
||||
|
||||
@ -167,6 +167,7 @@ function GiftItemStar({
|
||||
<div
|
||||
ref={ref}
|
||||
className={buildClassName(
|
||||
'interactive-gift',
|
||||
styles.container,
|
||||
styles.starGift,
|
||||
'starGiftItem',
|
||||
|
||||
@ -76,7 +76,7 @@ const UniqueGiftHeader = ({
|
||||
<div className={buildClassName(styles.root, className)}>
|
||||
<Transition
|
||||
className={styles.transition}
|
||||
slideClassName={styles.transitionSlide}
|
||||
slideClassName={buildClassName('interactive-gift', styles.transitionSlide)}
|
||||
activeKey={activeKey}
|
||||
direction={1}
|
||||
name="zoomBounceSemiFade"
|
||||
|
||||
@ -54,8 +54,10 @@ noscript {
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.nojs-video {
|
||||
pointer-events: none;
|
||||
|
||||
&::-webkit-media-controls {
|
||||
display: none;
|
||||
}
|
||||
@ -265,6 +267,20 @@ body:not(.is-ios) {
|
||||
}
|
||||
}
|
||||
|
||||
.interactive-gift {
|
||||
canvas {
|
||||
transition: 250ms transform;
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
&:hover, &:focus-visible {
|
||||
canvas {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.color-primary {
|
||||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user