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
2aea96c3
Unverified
Commit
2aea96c3
authored
Sep 30, 2022
by
Connor McEwen
Committed by
GitHub
Sep 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: fade in text on details page (#4773)
parent
b1fb499e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
3 deletions
+37
-3
About.tsx
src/components/Tokens/TokenDetails/About.tsx
+2
-0
ChartSection.tsx
src/components/Tokens/TokenDetails/ChartSection.tsx
+2
-0
StatsSection.tsx
src/components/Tokens/TokenDetails/StatsSection.tsx
+2
-0
animations.ts
src/theme/animations.ts
+28
-0
index.tsx
src/theme/index.tsx
+3
-3
No files found.
src/components/Tokens/TokenDetails/About.tsx
View file @
2aea96c3
...
...
@@ -2,6 +2,7 @@ import { Trans } from '@lingui/macro'
import
{
darken
}
from
'
polished
'
import
{
useState
}
from
'
react
'
import
styled
from
'
styled-components/macro
'
import
{
textFadeIn
}
from
'
theme/animations
'
import
Resource
from
'
./Resource
'
...
...
@@ -49,6 +50,7 @@ const TRUNCATE_CHARACTER_COUNT = 400
export
const
AboutContainer
=
styled
.
div
`
gap: 16px;
padding: 24px 0px;
${
textFadeIn
}
`
export
const
AboutHeader
=
styled
.
span
`
font-size: 28px;
...
...
src/components/Tokens/TokenDetails/ChartSection.tsx
View file @
2aea96c3
...
...
@@ -11,6 +11,7 @@ import { TopToken } from 'graphql/data/TopTokens'
import
{
CHAIN_NAME_TO_CHAIN_ID
}
from
'
graphql/data/util
'
import
useCurrencyLogoURIs
,
{
getTokenLogoURI
}
from
'
lib/hooks/useCurrencyLogoURIs
'
import
styled
from
'
styled-components/macro
'
import
{
textFadeIn
}
from
'
theme/animations
'
import
{
isAddress
}
from
'
utils
'
import
{
useIsFavorited
,
useToggleFavorite
}
from
'
../state
'
...
...
@@ -42,6 +43,7 @@ export const TokenNameCell = styled.div`
font-size: 20px;
line-height: 28px;
align-items: center;
${
textFadeIn
}
`
const
TokenSymbol
=
styled
.
span
`
text-transform: uppercase;
...
...
src/components/Tokens/TokenDetails/StatsSection.tsx
View file @
2aea96c3
import
{
Trans
}
from
'
@lingui/macro
'
import
{
ReactNode
}
from
'
react
'
import
styled
from
'
styled-components/macro
'
import
{
textFadeIn
}
from
'
theme/animations
'
import
{
formatDollarAmount
}
from
'
utils/formatDollarAmt
'
export
const
StatWrapper
=
styled
.
div
`
...
...
@@ -16,6 +17,7 @@ export const StatWrapper = styled.div`
export
const
TokenStatsSection
=
styled
.
div
`
display: flex;
flex-wrap: wrap;
${
textFadeIn
}
`
export
const
StatPair
=
styled
.
div
`
display: flex;
...
...
src/theme/animations.ts
0 → 100644
View file @
2aea96c3
import
{
css
,
keyframes
}
from
'
styled-components/macro
'
const
transitions
=
{
duration
:
{
slow
:
'
500ms
'
,
medium
:
'
250ms
'
,
fast
:
'
125ms
'
,
},
timing
:
{
ease
:
'
ease
'
,
in
:
'
ease-in
'
,
out
:
'
ease-out
'
,
inOut
:
'
ease-in-out
'
,
},
}
export
const
fadeIn
=
keyframes
`
from {
opacity: 0;
}
to {
opacity: 1;
}
`
export
const
textFadeIn
=
css
`
animation:
${
fadeIn
}
${
transitions
.
duration
.
fast
}
${
transitions
.
timing
.
in
}
;
`
src/theme/index.tsx
View file @
2aea96c3
...
...
@@ -36,6 +36,7 @@ const BREAKPOINTS = {
xxxl
:
1920
,
}
// deprecated - please use the animations.ts file
const
transitions
=
{
duration
:
{
slow
:
'
500ms
'
,
...
...
@@ -272,11 +273,10 @@ function getTheme(darkMode: boolean, isNewColorsEnabled: boolean): DefaultTheme
// media queries
deprecated_mediaWidth
:
deprecated_mediaWidthTemplates
,
//breakpoints
// deprecated - please use hardcoded exported values instead of
// adding to the theme object
breakpoint
:
BREAKPOINTS
,
transition
:
transitions
,
opacity
:
opacities
,
// css snippets
...
...
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