-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. rename the tag 2. add leap animation Ref: Magickbase/ckb-explorer-public-issues#773
- Loading branch information
Showing
5 changed files
with
170 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { TransactionLeapDirection } from '../RGBPP/types' | ||
import styles from './styles.module.scss' | ||
|
||
const Portal = ({ type }: { type: TransactionLeapDirection }) => ( | ||
<div className={styles.container} data-type={type}> | ||
<div className={styles.portal} data-side="left" /> | ||
<div className={styles.portal} data-side="right" /> | ||
<div className={styles.cube} /> | ||
</div> | ||
) | ||
|
||
export default Portal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
@import '../../styles/variables.module'; | ||
|
||
.container { | ||
position: relative; | ||
width: 50px; | ||
height: 20px; | ||
|
||
.portal { | ||
position: relative; | ||
height: 20px; | ||
width: 10px; | ||
border-radius: 50%; | ||
filter: blur(0.3px); | ||
} | ||
|
||
.portal::before { | ||
content: ''; | ||
position: absolute; | ||
top: 2px; | ||
bottom: 2px; | ||
border-radius: 50%; | ||
background: #fff; | ||
opacity: 0.6; | ||
} | ||
|
||
.portal[data-side='left'] { | ||
float: left; | ||
|
||
&::before { | ||
left: 2px; | ||
right: 0; | ||
} | ||
} | ||
|
||
.portal[data-side='right'] { | ||
float: right; | ||
|
||
&::before { | ||
left: 0; | ||
right: 2px; | ||
} | ||
} | ||
|
||
.cube { | ||
position: absolute; | ||
margin-top: 5px; | ||
width: 10px; | ||
height: 10px; | ||
border-radius: 2px; | ||
background-size: cover; | ||
z-index: 1; | ||
} | ||
|
||
&[data-type='with_in_btc'] { | ||
.portal[data-side='left'] { | ||
background: var(--btc-primary-color); | ||
} | ||
|
||
.portal[data-side='right'] { | ||
background: var(--btc-primary-color); | ||
} | ||
|
||
.cube { | ||
background: var(--btc-primary-color); | ||
animation: float 4s linear infinite; | ||
} | ||
|
||
@keyframes float { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
|
||
100% { | ||
transform: rotate(360deg); | ||
margin-left: 40px; | ||
} | ||
} | ||
} | ||
|
||
&[data-type='in'] { | ||
.portal[data-side='left'] { | ||
background: var(--btc-primary-color); | ||
} | ||
|
||
.portal[data-side='right'] { | ||
background: var(--primary-color); | ||
} | ||
|
||
.cube { | ||
animation: float-in 4s linear infinite; | ||
} | ||
|
||
@keyframes float-in { | ||
0% { | ||
transform: rotate(0deg); | ||
background: var(--btc-primary-color); | ||
} | ||
|
||
50% { | ||
background: #eee; | ||
} | ||
|
||
100% { | ||
transform: rotate(360deg); | ||
margin-left: 40px; | ||
background: var(--primary-color); | ||
} | ||
} | ||
} | ||
|
||
&[data-type='out'] { | ||
.portal[data-side='left'] { | ||
background: var(--primary-color); | ||
} | ||
|
||
.portal[data-side='right'] { | ||
background: var(--btc-primary-color); | ||
} | ||
|
||
.cube { | ||
animation: float-out 4s linear infinite; | ||
} | ||
|
||
@keyframes float-out { | ||
0% { | ||
transform: rotate(0deg); | ||
background: var(--primary-color); | ||
} | ||
|
||
50% { | ||
background: #eee; | ||
} | ||
|
||
100% { | ||
transform: rotate(360deg); | ||
margin-left: 40px; | ||
background: var(--btc-primary-color); | ||
} | ||
} | ||
} | ||
|
||
@media (width<=$mobileBreakPoint) { | ||
margin: 4px 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters