Commit 43439502 authored by Chunchi Che's avatar Chunchi Che

update Card.tsx in PlayMat

parent 6fcb34c8
Pipeline #26998 passed with stages
in 10 minutes and 57 seconds
...@@ -102,8 +102,7 @@ ...@@ -102,8 +102,7 @@
} }
} }
.mat-card.glowing .shadow { .frame {
--shadow-color: #0099ff;
display: block !important; display: block !important;
background: var(--shadow-color) !important; background: var(--shadow-color) !important;
border-radius: 5px; border-radius: 5px;
...@@ -111,6 +110,16 @@ ...@@ -111,6 +110,16 @@
transform: translateZ(calc((var(--z)) * 1px + 0.1px)); transform: translateZ(calc((var(--z)) * 1px + 0.1px));
} }
.mat-card.glowing .shadow {
--shadow-color: #0099ff;
@extend .frame;
}
.mat-card.shining {
--shadow-color: #f4ff00;
@extend .frame;
}
@keyframes focus { @keyframes focus {
0% { 0% {
filter: brightness(1) contrast(1); filter: brightness(1) contrast(1);
......
...@@ -274,7 +274,11 @@ export const Card: React.FC<{ idx: number }> = React.memo(({ idx }) => { ...@@ -274,7 +274,11 @@ export const Card: React.FC<{ idx: number }> = React.memo(({ idx }) => {
return ( return (
<animated.div <animated.div
className={classnames(styles["mat-card"], { [styles.glowing]: glowing })} className={classnames(styles["mat-card"], {
/* 有可操作选项或者已被选中*/
[styles.glowing]: glowing || snap.selectInfo.selected,
[styles.shining]: snap.selectInfo.selectable, // 可以被选中
})}
style={ style={
{ {
transform: to( transform: to(
...@@ -313,7 +317,6 @@ export const Card: React.FC<{ idx: number }> = React.memo(({ idx }) => { ...@@ -313,7 +317,6 @@ export const Card: React.FC<{ idx: number }> = React.memo(({ idx }) => {
> >
<YgoCard <YgoCard
className={styles.cover} className={styles.cover}
// cardName={snap.meta.text.name}
code={snap.code === 0 ? snap.meta.id : snap.code} code={snap.code === 0 ? snap.meta.id : snap.code}
/> />
<YgoCard className={styles.back} isBack /> <YgoCard className={styles.back} isBack />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment