Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7f7be2b

Browse files
committedJan 9, 2022
fix types in useColorModeValue
1 parent 666bd52 commit 7f7be2b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-color-mode",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "A helper for creating non-flickering and accessible themed applications",
55
"source": "src/index.ts",
66
"main": "./lib/next-color-mode.cjs",

‎src/useColorModeValue.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
export function useColorModeValue(name: string, lightThemeValue: string, darkThemeValue: string) {
1+
export function useColorModeValue(
2+
name: string,
3+
lightThemeValue: string,
4+
darkThemeValue: string,
5+
): [string, { light: string; dark: string }] {
26
return [`var(--${name})`, { light: `--${name}: ${lightThemeValue};`, dark: `--${name}: ${darkThemeValue};` }]
37
}

1 commit comments

Comments
 (1)
Please sign in to comment.