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
610acb01
Unverified
Commit
610acb01
authored
Mar 10, 2022
by
Zach Pomerantz
Committed by
GitHub
Mar 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: font family overrides (#3485)
parent
63bad8f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
Widget.tsx
src/lib/components/Widget.tsx
+2
-2
index.tsx
src/lib/theme/index.tsx
+4
-2
theme.ts
src/lib/theme/theme.ts
+6
-2
No files found.
src/lib/components/Widget.tsx
View file @
610acb01
...
@@ -40,10 +40,10 @@ const WidgetWrapper = styled.div<{ width?: number | string }>`
...
@@ -40,10 +40,10 @@ const WidgetWrapper = styled.div<{ width?: number | string }>`
* {
* {
box-sizing: border-box;
box-sizing: border-box;
font-family:
${({
theme
})
=>
theme
.
fontFamily
}
;
font-family:
${({
theme
})
=>
(
typeof
theme
.
fontFamily
===
'
string
'
?
theme
.
fontFamily
:
theme
.
fontFamily
.
font
)
}
;
@supports (font-variation-settings: normal) {
@supports (font-variation-settings: normal) {
font-family:
${({
theme
})
=>
theme
.
fontFamilyVariable
}
;
font-family:
${({
theme
})
=>
(
typeof
theme
.
fontFamily
===
'
string
'
?
undefined
:
theme
.
fontFamily
.
variable
)
}
;
}
}
}
}
`
`
...
...
src/lib/theme/index.tsx
View file @
610acb01
...
@@ -73,8 +73,10 @@ export const darkTheme: Colors = {
...
@@ -73,8 +73,10 @@ export const darkTheme: Colors = {
export
const
defaultTheme
=
{
export
const
defaultTheme
=
{
borderRadius
:
1
,
borderRadius
:
1
,
fontFamily
:
'
"Inter", sans-serif
'
,
fontFamily
:
{
fontFamilyVariable
:
'
"InterVariable", sans-serif
'
,
font
:
'
"Inter", sans-serif
'
,
variable
:
'
"InterVariable", sans-serif
'
,
},
fontFamilyCode
:
'
IBM Plex Mono
'
,
fontFamilyCode
:
'
IBM Plex Mono
'
,
tokenColorExtraction
:
false
,
tokenColorExtraction
:
false
,
...
lightTheme
,
...
lightTheme
,
...
...
src/lib/theme/theme.ts
View file @
610acb01
...
@@ -27,8 +27,12 @@ export type Color = keyof Colors
...
@@ -27,8 +27,12 @@ export type Color = keyof Colors
export
interface
Attributes
{
export
interface
Attributes
{
borderRadius
:
boolean
|
number
borderRadius
:
boolean
|
number
fontFamily
:
string
fontFamily
:
fontFamilyVariable
:
string
|
string
|
{
font
:
string
variable
:
string
}
fontFamilyCode
:
string
fontFamilyCode
:
string
tokenColorExtraction
:
boolean
tokenColorExtraction
:
boolean
}
}
...
...
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