mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
refactor play button for reusability
This commit is contained in:
@@ -45,6 +45,22 @@
|
||||
margin-bottom: var(--theme-spacing-lg);
|
||||
}
|
||||
|
||||
.play-button {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%) scale(var(--play-button-scale, 1));
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
transform: translate(-50%, -50%) scale(1.1);
|
||||
}
|
||||
|
||||
&:active {
|
||||
opacity: 1;
|
||||
transform: translate(-50%, -50%) scale(0.9);
|
||||
}
|
||||
}
|
||||
|
||||
.primary {
|
||||
left: 50%;
|
||||
width: 25%;
|
||||
|
||||
@@ -236,18 +236,18 @@ export const ItemCardControls = ({
|
||||
{controls?.onPlay && (
|
||||
<>
|
||||
<PlayButton
|
||||
classNames={clsx(styles.primary)}
|
||||
classNames={clsx(styles.playButton, styles.primary)}
|
||||
onClick={playNowHandler}
|
||||
onLongPress={playShuffleHandler}
|
||||
/>
|
||||
<PlayButton
|
||||
classNames={clsx(styles.secondary, styles.left)}
|
||||
classNames={clsx(styles.playButton, styles.secondary, styles.left)}
|
||||
icon="mediaPlayNext"
|
||||
onClick={playNextHandler}
|
||||
onLongPress={playNextShuffleHandler}
|
||||
/>
|
||||
<PlayButton
|
||||
classNames={clsx(styles.secondary, styles.right)}
|
||||
classNames={clsx(styles.playButton, styles.secondary, styles.right)}
|
||||
icon="mediaPlayLast"
|
||||
onClick={playLastHandler}
|
||||
onLongPress={playLastShuffleHandler}
|
||||
|
||||
Reference in New Issue
Block a user