-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: fixes tokens and input component
- Loading branch information
Showing
9 changed files
with
84 additions
and
3 deletions.
There are no files selected for viewing
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
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 +1,2 @@ | ||
export * from './input.styles.css'; | ||
export * from "./input.styles.css"; | ||
export * from "./input.styles.types"; |
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export type IInputTheme = [ | ||
string, | ||
{ | ||
borderColor: string; | ||
padding: { | ||
top: string; | ||
right: string; | ||
bottom: string; | ||
left: string; | ||
}; | ||
} | ||
]; |
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const breakpoints = { | ||
tablet: "screen and (min-width: 600px)", | ||
laptop: "screen and (min-width: 768px)" | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Tokens } from "@vanilla-extract/css/dist/declarations/src/types"; | ||
|
||
export const lightColors: IThemeColors = { | ||
brand: { | ||
100: "hsla(51,10%,91%,1)", | ||
200: "hsla(51,33%,91%,1)", | ||
300: "hsla(51,76%,91%,1)", | ||
400: "hsla(213, 84%, 19%, 1)" | ||
}, | ||
typography: { | ||
200: "hsla(0, 0%, 25%,1)", | ||
500: "hsla(0, 0%, 10%,1)", | ||
900: "hsla(0, 0%, 0%,1)" | ||
}, | ||
success: "hsla(145, 63%, 42%, 1)", | ||
warning: "hsla(45, 74%, 56%, 1)", | ||
error: "hsla(0, 79%, 63%, 1)" | ||
}; | ||
|
||
export interface IThemeColors { | ||
[key: string]: string | Tokens; | ||
brand: { | ||
100: string; | ||
200: string; | ||
300: string; | ||
400: string; | ||
}; | ||
typography: { | ||
200: string; | ||
500: string; | ||
900: string; | ||
}; | ||
success: string; | ||
warning: string; | ||
error: string; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from "./breakpoints"; | ||
export * from "./colors"; | ||
export * from "./typography"; |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { modularScale } from "polished"; | ||
|
||
const baseFontSizeInPx = 16; | ||
const fontEnlargementScale = 1.3; | ||
const createScale = (ratio: number, base: number) => (steps: number) => | ||
`${modularScale(steps, base, ratio)}px`; | ||
|
||
const fontSizeScale = createScale(fontEnlargementScale, baseFontSizeInPx); | ||
|
||
export const fontSizeVars = { | ||
"100": fontSizeScale(0), | ||
"200": fontSizeScale(1), | ||
"300": fontSizeScale(2), | ||
"400": fontSizeScale(3), | ||
"500": fontSizeScale(4), | ||
"600": fontSizeScale(5) | ||
}; | ||
|
||
export const fontVars = { | ||
primary: "'Poppins', system-ui", | ||
secondary: "'Overpass', system-ui" | ||
}; |