feat(theme): dark theme detection

This commit is contained in:
iCrawl
2022-07-18 02:57:29 +02:00
parent ec230faa4d
commit 66092cad8b
4 changed files with 16 additions and 9 deletions

View File

@@ -74,6 +74,7 @@
"@typescript-eslint/eslint-plugin": "^5.30.6",
"@typescript-eslint/parser": "^5.30.6",
"@unocss/cli": "^0.44.3",
"@unocss/preset-web-fonts": "^0.44.3",
"@unocss/reset": "^0.44.3",
"@vitejs/plugin-react": "^2.0.0",
"c8": "^7.11.3",

View File

@@ -11,7 +11,7 @@ export interface PropertiesSectionProps {
export function PropertiesSection({ data }: PropertiesSectionProps) {
return data.length ? (
<Section title="Properties">
<Section title="Properties" className="dark:text-white">
<PropertyList data={data} />
</Section>
) : null;
@@ -35,7 +35,7 @@ export interface ParametersSectionProps {
export function ParametersSection({ data }: ParametersSectionProps) {
return data.length ? (
<Section title="Parameters">
<Section title="Parameters" className="dark:text-white">
<ParameterTable data={data} />
</Section>
) : null;

View File

@@ -1,9 +1,14 @@
import { defineConfig } from 'unocss';
import presetWebFonts from '@unocss/preset-web-fonts';
import { defineConfig, presetUno } from 'unocss';
export default defineConfig({
theme: {
fontFamily: {
mono: ['JetBrains Mono'],
},
},
presets: [
presetUno({ dark: 'media' }),
presetWebFonts({
provider: 'google',
fonts: {
sans: 'JetBrains Mono',
},
}),
],
});

View File

@@ -2460,6 +2460,7 @@ __metadata:
"@typescript-eslint/eslint-plugin": ^5.30.6
"@typescript-eslint/parser": ^5.30.6
"@unocss/cli": ^0.44.3
"@unocss/preset-web-fonts": ^0.44.3
"@unocss/reset": ^0.44.3
"@vitejs/plugin-react": ^2.0.0
"@vscode/codicons": ^0.0.31
@@ -4472,7 +4473,7 @@ __metadata:
languageName: node
linkType: hard
"@unocss/preset-web-fonts@npm:0.44.3":
"@unocss/preset-web-fonts@npm:0.44.3, @unocss/preset-web-fonts@npm:^0.44.3":
version: 0.44.3
resolution: "@unocss/preset-web-fonts@npm:0.44.3"
dependencies: