Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
27b831b3
Unverified
Commit
27b831b3
authored
Mar 04, 2022
by
Zach Pomerantz
Committed by
GitHub
Mar 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: convert inline spinner to svg (#3432)
* chore: convert inline spinner to svg * feat: inline spinner outline
parent
6d9d3881
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
61 deletions
+45
-61
inline_spinner.svg
src/lib/assets/svg/inline_spinner.svg
+34
-0
spinner.svg
src/lib/assets/svg/spinner.svg
+1
-2
Caption.tsx
src/lib/components/Swap/Toolbar/Caption.tsx
+1
-2
InlineSpinner.tsx
src/lib/icons/InlineSpinner.tsx
+0
-57
index.tsx
src/lib/icons/index.tsx
+9
-0
No files found.
src/lib/assets/svg/inline_spinner.svg
0 → 100644
View file @
27b831b3
<svg
viewBox=
"0 0 24 24"
xmlns=
"http://www.w3.org/2000/svg"
>
<mask
id=
"mask"
>
<circle
cx=
"12"
cy=
"12"
r=
"10"
fill=
"black"
stroke=
"black"
stroke-width=
"2"
/>
<rect
width=
"12"
height=
"12"
fill=
"white"
stroke-width=
"0"
/>
<circle
cx=
"2"
cy=
"12"
r=
"1"
fill=
"white"
stroke-width=
"0"
/>
<circle
cx=
"12"
cy=
"2"
r=
"1"
fill=
"white"
stroke-width=
"0"
/>
</mask>
<circle
cx=
"12"
cy=
"12"
r=
"6"
stroke=
"none"
/>
<circle
cx=
"12"
cy=
"12"
r=
"10"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
fill=
"none"
/>
<circle
cx=
"12"
cy=
"12"
r=
"10"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
fill=
"none"
mask=
"url(#mask)"
/>
</svg>
\ No newline at end of file
src/lib/assets/svg/spinner.svg
View file @
27b831b3
<svg
viewBox=
"0 0 24 24"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<svg
viewBox=
"0 0 24 24"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<mask
id=
"mask"
>
<mask
id=
"mask"
>
<
rect
width=
"24"
height=
"24"
fill=
"white"
stroke-width=
"0
"
/>
<
circle
cx=
"12"
cy=
"12"
r=
"10"
stroke=
"white"
stroke-width=
"2
"
/>
<rect
width=
"12"
height=
"12"
fill=
"black"
stroke-width=
"0"
/>
<rect
width=
"12"
height=
"12"
fill=
"black"
stroke-width=
"0"
/>
<circle
cx=
"2"
cy=
"12"
r=
"1"
fill=
"white"
stroke-width=
"0"
/>
<circle
cx=
"2"
cy=
"12"
r=
"1"
fill=
"white"
stroke-width=
"0"
/>
<circle
cx=
"12"
cy=
"2"
r=
"1"
fill=
"white"
stroke-width=
"0"
/>
<circle
cx=
"12"
cy=
"2"
r=
"1"
fill=
"white"
stroke-width=
"0"
/>
</mask>
</mask>
<circle
<circle
id=
"circle"
cx=
"12"
cx=
"12"
cy=
"12"
cy=
"12"
r=
"10"
r=
"10"
...
...
src/lib/components/Swap/Toolbar/Caption.tsx
View file @
27b831b3
...
@@ -3,8 +3,7 @@ import { Currency, TradeType } from '@uniswap/sdk-core'
...
@@ -3,8 +3,7 @@ import { Currency, TradeType } from '@uniswap/sdk-core'
import
useUSDCPrice
from
'
hooks/useUSDCPrice
'
import
useUSDCPrice
from
'
hooks/useUSDCPrice
'
import
Tooltip
from
'
lib/components/Tooltip
'
import
Tooltip
from
'
lib/components/Tooltip
'
import
{
WrapType
}
from
'
lib/hooks/swap/useWrapCallback
'
import
{
WrapType
}
from
'
lib/hooks/swap/useWrapCallback
'
import
{
AlertTriangle
,
Icon
,
Info
}
from
'
lib/icons
'
import
{
AlertTriangle
,
Icon
,
Info
,
InlineSpinner
}
from
'
lib/icons
'
import
InlineSpinner
from
'
lib/icons/InlineSpinner
'
import
{
ThemedText
}
from
'
lib/theme
'
import
{
ThemedText
}
from
'
lib/theme
'
import
{
ReactNode
,
useCallback
,
useMemo
,
useState
}
from
'
react
'
import
{
ReactNode
,
useCallback
,
useMemo
,
useState
}
from
'
react
'
import
{
InterfaceTrade
}
from
'
state/routing/types
'
import
{
InterfaceTrade
}
from
'
state/routing/types
'
...
...
src/lib/icons/InlineSpinner.tsx
deleted
100644 → 0
View file @
6d9d3881
import
styled
,
{
keyframes
}
from
'
lib/theme
'
const
rotate
=
keyframes
`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`
const
Wrapper
=
styled
.
div
`
align-items: center;
display: flex;
height: 16px;
transition: 250ms ease color;
width: 16px;
`
const
InnerDot
=
styled
.
div
`
background-color:
${({
theme
})
=>
theme
.
outline
}
;
border-radius: 50%;
height: 8px;
margin-left: 3px;
min-height: 8px;
min-width: 8px;
position: relative;
transition: 250ms ease background-color;
width: 8px;
`
const
OuterRing
=
styled
.
div
`
animation:
${
rotate
}
1s cubic-bezier(0.83, 0, 0.17, 1) infinite;
background: transparent;
border-bottom: 1px solid transparent;
border-left: 2px solid
${({
theme
})
=>
theme
.
primary
}
;
border-radius: 50%;
border-right: 1px solid transparent;
border-top: 1px solid transparent;
height: 14px;
left: -3px;
position: relative;
top: -3px;
transform: translateZ(0);
transition: 250ms ease border-color;
width: 14px;
`
export
default
function
InlineSpinner
()
{
return
(
<
Wrapper
>
<
InnerDot
>
<
OuterRing
/>
</
InnerDot
>
</
Wrapper
>
)
}
src/lib/icons/index.tsx
View file @
27b831b3
import
{
ReactComponent
as
RouterIcon
}
from
'
lib/assets/svg/auto_router.svg
'
import
{
ReactComponent
as
RouterIcon
}
from
'
lib/assets/svg/auto_router.svg
'
import
{
ReactComponent
as
CheckIcon
}
from
'
lib/assets/svg/check.svg
'
import
{
ReactComponent
as
CheckIcon
}
from
'
lib/assets/svg/check.svg
'
import
{
ReactComponent
as
ExpandoIcon
}
from
'
lib/assets/svg/expando.svg
'
import
{
ReactComponent
as
ExpandoIcon
}
from
'
lib/assets/svg/expando.svg
'
import
{
ReactComponent
as
InlineSpinnerIcon
}
from
'
lib/assets/svg/inline_spinner.svg
'
import
{
ReactComponent
as
LogoIcon
}
from
'
lib/assets/svg/logo.svg
'
import
{
ReactComponent
as
LogoIcon
}
from
'
lib/assets/svg/logo.svg
'
import
{
ReactComponent
as
SpinnerIcon
}
from
'
lib/assets/svg/spinner.svg
'
import
{
ReactComponent
as
SpinnerIcon
}
from
'
lib/assets/svg/spinner.svg
'
import
{
ReactComponent
as
WalletIcon
}
from
'
lib/assets/svg/wallet.svg
'
import
{
ReactComponent
as
WalletIcon
}
from
'
lib/assets/svg/wallet.svg
'
...
@@ -133,3 +134,11 @@ export const Spinner = styled(icon(SpinnerIcon))<{ color?: Color }>`
...
@@ -133,3 +134,11 @@ export const Spinner = styled(icon(SpinnerIcon))<{ color?: Color }>`
stroke-linecap: round;
stroke-linecap: round;
stroke-width: 2;
stroke-width: 2;
`
`
export
const
InlineSpinner
=
styled
(
icon
(
InlineSpinnerIcon
))
<
{
color
?:
Color
}
>
`
animation:
${
rotate
}
1s cubic-bezier(0.83, 0, 0.17, 1) infinite;
color:
${({
color
=
'
active
'
,
theme
})
=>
theme
[
color
]}
;
fill:
${({
theme
})
=>
theme
.
outline
}
;
stroke:
${({
theme
})
=>
theme
.
outline
}
;
stroke-linecap: round;
`
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment