-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v4.1.3
- Loading branch information
Showing
37 changed files
with
5,788 additions
and
6,210 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,17 +1,22 @@ | ||
import styled, { css } from 'styled-components'; | ||
|
||
const sharedStyles = css<{ fontWeight?: string; themeColor?: string }>` | ||
type Contrast = 'strong' | 'mild'; | ||
|
||
const sharedStyles = css<{ fontWeight?: string; contrast?: Contrast }>` | ||
font-family: ${(props) => props.theme.fonts.mono}; | ||
font-weight: ${(props) => props.fontWeight || 'regular'}; | ||
color: ${({ themeColor, theme }) => | ||
// @ts-ignore | ||
(themeColor && theme.colors.selectedTheme[themeColor]) || theme.colors.selectedTheme.gray}; | ||
color: ${({ contrast, theme }) => { | ||
if (!contrast) return theme.colors.selectedTheme.gray; | ||
return contrast === 'strong' | ||
? theme.colors.selectedTheme.text.value | ||
: theme.colors.selectedTheme.text.label; | ||
}}; | ||
`; | ||
|
||
export const NumberDiv = styled.div<{ fontWeight?: string; themeColor?: string }>` | ||
export const NumberDiv = styled.div<{ fontWeight?: string; contrast?: Contrast }>` | ||
${sharedStyles} | ||
`; | ||
|
||
export const NumberSpan = styled.span<{ fontWeight?: string; themeColor?: string }>` | ||
export const NumberSpan = styled.span<{ fontWeight?: string; contrast?: Contrast }>` | ||
${sharedStyles} | ||
`; |
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
Oops, something went wrong.
db65d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
kwenta – ./
kwenta-git-main-kwenta.vercel.app
kwenta.io
kwenta-kwenta.vercel.app