@autobusal/providers 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  import { useState, useEffect } from 'react';
2
2
 
3
- const useSystemTheme = (): string => {
3
+ const useSystemTheme = (): ('light' | 'dark') => {
4
4
  const queryDarkMode = window.matchMedia("(prefers-color-scheme: dark)");
5
5
 
6
- const [ theme, setTheme ] = useState<string>(queryDarkMode.matches ? 'dark' : 'light');
6
+ const [ theme, setTheme ] = useState<'light' | 'dark'>(queryDarkMode.matches ? 'dark' : 'light');
7
7
 
8
8
  // setup a listener to respond to future changes of the system theme
9
9
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "dependencies": {