-
Notifications
You must be signed in to change notification settings - Fork 421
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add progress of scanning QR code * fix delay of scanning
- Loading branch information
1 parent
5e95b6f
commit e5832fe
Showing
5 changed files
with
70 additions
and
5 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,22 @@ | ||
.progress { | ||
text-align: center; | ||
&-bar { | ||
width: 100%; | ||
background-color: #dadada; | ||
border-radius: 3px; | ||
overflow: hidden; | ||
&::before { | ||
content: " "; | ||
display: block; | ||
height: 6px; | ||
width: var(--percent); | ||
background-color: #7084ff; | ||
} | ||
} | ||
&-num { | ||
font-size: 12px; | ||
color: #7084ff; | ||
margin-top: 12px; | ||
line-height: 1; | ||
} | ||
} |
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,19 @@ | ||
import React from 'react'; | ||
import clsx from 'clsx'; | ||
import './index.less'; | ||
|
||
interface Props { | ||
percent: number; | ||
} | ||
|
||
export default function Progress({ percent }: Props) { | ||
return ( | ||
<div className={clsx('progress')}> | ||
<div | ||
className={clsx('progress-bar')} | ||
style={{ '--percent': `${percent}%` }} | ||
></div> | ||
<div className={clsx('progress-num')}>{percent}%</div> | ||
</div> | ||
); | ||
} |
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