-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from designcise/feat/typescript-support
feat: add typescript support
- Loading branch information
Showing
37 changed files
with
4,361 additions
and
7,909 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 100 | ||
"bracketSameLine": true, | ||
"printWidth": 100, | ||
"arrowParens": "avoid" | ||
} |
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 was deleted.
Oops, something went wrong.
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 @@ | ||
import { useTheme } from '../../src/client' | ||
|
||
export default function ThemeAutoColor() { | ||
const { theme, themes } = useTheme() | ||
|
||
return ( | ||
<> | ||
<div>Active Theme: {theme.type}</div> | ||
<div>Auto-determined Color: {themes.auto.color}</div> | ||
</> | ||
) | ||
} |
1 change: 0 additions & 1 deletion
1
__tests__/assets/ThemeAutoToggle.jsx → __tests__/assets/ThemeAutoToggle.tsx
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 was deleted.
Oops, something went wrong.
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,13 @@ | ||
'use client' | ||
|
||
import { useTheme } from '../../src/client' | ||
|
||
export default function ToggleThemeButton() { | ||
const { theme, themes, setTheme } = useTheme() | ||
|
||
return ( | ||
<button onClick={() => setTheme(theme.type === themes.dark.type ? themes.light : themes.dark)}> | ||
Toggle Theme | ||
</button> | ||
) | ||
} |
7 changes: 3 additions & 4 deletions
7
__tests__/assets/ThemeSwitcher.jsx → __tests__/assets/ThemeSwitcher.tsx
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.