use-settings
Advanced tools
Comparing version 1.0.0 to 1.0.2
/// <reference types="react" /> | ||
import type { TSettingsContext } from './types'; | ||
declare const SettingsContext: import("react").Context<TSettingsContext | undefined>; | ||
declare const SettingsContext: import("react").Context<TSettingsContext>; | ||
export { SettingsContext }; |
@@ -24,3 +24,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var SettingsContext = React.createContext(undefined); | ||
var SettingsContext = React.createContext({}); | ||
@@ -98,3 +98,2 @@ var _isEmpty = function _isEmpty(v) { | ||
settings: settings, | ||
updateSettings: updateSettings, | ||
updateSetting: updateSetting, | ||
@@ -101,0 +100,0 @@ toggleSetting: toggleSetting, |
@@ -21,3 +21,3 @@ import React, { createContext, useState, useEffect, useContext } from 'react'; | ||
var SettingsContext = createContext(undefined); | ||
var SettingsContext = createContext({}); | ||
@@ -95,3 +95,2 @@ var _isEmpty = function _isEmpty(v) { | ||
settings: settings, | ||
updateSettings: updateSettings, | ||
updateSetting: updateSetting, | ||
@@ -98,0 +97,0 @@ toggleSetting: toggleSetting, |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
interface TSettingsProvider { | ||
@@ -8,7 +8,7 @@ name: string; | ||
interface TSettingsContext { | ||
settings: Object; | ||
updateSetting(k: string, v: any): void; | ||
toggleSetting(name: string): void; | ||
reset(value: any): void; | ||
settings?: any; | ||
updateSetting?(k: string, v: any): void; | ||
toggleSetting?(name: string): void; | ||
reset?(value: any): void; | ||
} | ||
export type { TSettingsProvider, TSettingsContext }; |
@@ -1,2 +0,2 @@ | ||
declare const useSettings: () => import("./types").TSettingsContext | undefined; | ||
declare const useSettings: () => import("./types").TSettingsContext; | ||
export { useSettings }; |
{ | ||
"name": "use-settings", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -38,5 +38,3 @@ "private": false, | ||
], | ||
"dependencies": { | ||
"zustand": "^3.6.7" | ||
} | ||
"dependencies": {} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
22283
220
- Removedzustand@^3.6.7
- Removedzustand@3.7.2(transitive)