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
99bea34f
Unverified
Commit
99bea34f
authored
Nov 07, 2022
by
vignesh mohankumar
Committed by
GitHub
Nov 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: add new background to theme (#5109)
* chore: add new background to theme * update snapshot
parent
58f1c6ff
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
6 deletions
+11
-6
RoutingDiagram.test.tsx.snap
...RoutingDiagram/__snapshots__/RoutingDiagram.test.tsx.snap
+2
-2
colors.ts
src/theme/colors.ts
+6
-3
index.tsx
src/theme/index.tsx
+2
-1
styled.d.ts
src/theme/styled.d.ts
+1
-0
No files found.
src/components/RoutingDiagram/__snapshots__/RoutingDiagram.test.tsx.snap
View file @
99bea34f
...
...
@@ -131,7 +131,7 @@ exports[`renders multi route 1`] = `
.c9 {
background-color: #B8C0DC;
border-radius: 4px;
color: #
5D6785
;
color: #
7780A0
;
font-size: 10px;
padding: 2px 4px;
z-index: 1021;
...
...
@@ -369,7 +369,7 @@ exports[`renders single route 1`] = `
.c9 {
background-color: #B8C0DC;
border-radius: 4px;
color: #
5D6785
;
color: #
7780A0
;
font-size: 10px;
padding: 2px 4px;
z-index: 1021;
...
...
src/theme/colors.ts
View file @
99bea34f
...
...
@@ -187,6 +187,7 @@ export const colors: GlobalPalette = {
export
interface
Palette
{
userThemeColor
:
Color
background
:
string
backgroundBackdrop
:
Color
backgroundSurface
:
Color
backgroundInteractive
:
Color
...
...
@@ -248,17 +249,18 @@ export interface Palette {
export
const
colorsLight
:
Palette
=
{
userThemeColor
:
colors
.
magentaVibrant
,
background
:
'
#faf9fa
'
,
//INTENTIONALLY OFF THEME TO GIVE WHITE BG A SOFTER VISUAL
backgroundBackdrop
:
colors
.
white
,
backgroundSurface
:
colors
.
white
,
backgroundModule
:
colors
.
gray50
,
backgroundInteractive
:
colors
.
gray100
,
backgroundFloating
:
opacify
(
8
,
colors
.
gray700
),
backgroundOutline
:
opacify
(
24
,
colors
.
gray500
)
,
backgroundOutline
:
colors
.
gray150
,
backgroundScrim
:
opacify
(
60
,
colors
.
gray900
),
backgroundScrolledSurface
:
opacify
(
72
,
colors
.
white
),
textPrimary
:
colors
.
gray900
,
textSecondary
:
colors
.
gray
5
00
,
textSecondary
:
colors
.
gray
4
00
,
textTertiary
:
colors
.
gray300
,
accentAction
:
colors
.
pink400
,
...
...
@@ -311,12 +313,13 @@ export const colorsLight: Palette = {
export
const
colorsDark
:
Palette
=
{
userThemeColor
:
colors
.
magentaVibrant
,
background
:
colors
.
gray800
,
backgroundBackdrop
:
colors
.
black
,
backgroundSurface
:
colors
.
gray900
,
backgroundModule
:
colors
.
gray800
,
backgroundInteractive
:
colors
.
gray700
,
backgroundFloating
:
opacify
(
12
,
colors
.
black
),
backgroundOutline
:
opacify
(
14
,
colors
.
gray300
)
,
backgroundOutline
:
colors
.
gray750
,
backgroundScrim
:
opacify
(
72
,
colors
.
gray900
),
backgroundScrolledSurface
:
opacify
(
72
,
colors
.
gray900
),
...
...
src/theme/index.tsx
View file @
99bea34f
...
...
@@ -73,6 +73,7 @@ function uniswapThemeColors(darkMode: boolean): ThemeColors {
return
{
userThemeColor
:
darkMode
?
colorsDark
.
userThemeColor
:
colorsLight
.
userThemeColor
,
background
:
darkMode
?
colorsDark
.
background
:
colorsLight
.
background
,
backgroundBackdrop
:
darkMode
?
colorsDark
.
backgroundBackdrop
:
colorsLight
.
backgroundBackdrop
,
backgroundSurface
:
darkMode
?
colorsDark
.
backgroundSurface
:
colorsLight
.
backgroundSurface
,
backgroundModule
:
darkMode
?
colorsDark
.
backgroundModule
:
colorsLight
.
backgroundModule
,
...
...
@@ -320,7 +321,7 @@ export const ThemedText = {
export
const
ThemedGlobalStyle
=
createGlobalStyle
`
html {
color:
${({
theme
})
=>
theme
.
deprecated_text1
}
;
background-color:
${({
theme
})
=>
theme
.
deprecated_bg1
}
!important;
background-color:
${({
theme
})
=>
theme
.
background
}
!important;
}
a {
...
...
src/theme/styled.d.ts
View file @
99bea34f
...
...
@@ -6,6 +6,7 @@ export type AllColors = ThemeColors | Colors
export
interface
ThemeColors
{
userThemeColor
:
string
background
:
string
backgroundBackdrop
:
Color
backgroundSurface
:
Color
backgroundModule
:
Color
...
...
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