-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(theme): move tailwind.preset.ts in theme to be reused
- Loading branch information
Showing
8 changed files
with
107 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/*.spec.ts | ||
**/*.stories.ts |
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
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,49 @@ | ||
import type {Config} from "tailwindcss"; | ||
import colors from "tailwindcss/colors"; | ||
|
||
const primary = "var(--vp-button-brand-bg)"; | ||
|
||
export const tailwindPreset: Partial<Config> = { | ||
theme: { | ||
colors: { | ||
...colors, | ||
blue: { | ||
DEFAULT: primary, | ||
default: primary, | ||
50: "hsla(226, 54.3%, 91%, 1)", | ||
100: "hsla(226, 54.3%, 83%, 1)", | ||
200: "hsla(226, 54.3%, 75%, 1)", | ||
300: "hsla(226, 54.3%, 67%, 1)", | ||
400: "hsla(226, 54.3%, 59%, 1)", | ||
500: "hsla(226, 54.3%, 61%, 1)", | ||
600: primary, | ||
700: "hsla(226, 54.3%, 31%, 1)", | ||
800: "hsla(226, 54.3%, 25%, 1)", | ||
900: "hsla(226, 54.3%, 14%, 1)", | ||
active: "var(--vp-button-brand-hover-bg)" | ||
}, | ||
algoliaSearch: { | ||
white: "rgb(243 244 246 / 1)", | ||
dark: "rgb(28 30 33 / 1)" | ||
}, | ||
"api-default": "#507192" | ||
}, | ||
extend: { | ||
fontSize: { | ||
micro: ".5rem", // 8px | ||
xxs: ".625rem", // 10px | ||
xs: ".75rem" // 12px | ||
}, | ||
borderRadius: { | ||
xs: ".15rem" // 5px | ||
}, | ||
fontFamily: { | ||
brand: ["Source Sans Pro", "sans-serif"], | ||
sans: ["Source Sans Pro", "sans-serif"], | ||
serif: ["Source Sans Pro", "sans-serif"], | ||
inconsolata: ["Inconsolata"], | ||
source: ["source-code-pro", "Menlo", "Monaco", "Consolas", "Courier New", "monospace"] | ||
} | ||
} | ||
} | ||
}; |
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,11 @@ | ||
import {upperFirst} from "./upperFirst"; | ||
|
||
describe("upperFirst", () => { | ||
it("should return the string with the first letter in uppercase", () => { | ||
expect(upperFirst("hello")).toBe("Hello"); | ||
}); | ||
|
||
it("should return the string with the first letter in uppercase (sentence)", () => { | ||
expect(upperFirst("hello world")).toBe("Hello world"); | ||
}); | ||
}); |
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