@rescui/ui-contexts
Advanced tools
Comparing version 0.0.2 to 0.1.0
@@ -6,2 +6,15 @@ # Change Log | ||
<a name="v0.1.0"></a> | ||
# 0.1.0 (2021-06-03) | ||
### Features | ||
* Add getInverseTheme helper ([52c7251](https://github.com/JetBrains/RescUI/commit/52c7251)) | ||
<a name="v0.0.2"></a> | ||
@@ -8,0 +21,0 @@ ## 0.0.2 (2021-03-30) |
export { LayeringConsumer, withLayering, useLayeringContext } from './parts/layering-context'; | ||
export { default as LayeringProvider } from './layering-provider'; | ||
export { ThemeConsumer, withTheme, useTheme } from './parts/theme-context'; | ||
export { ThemeConsumer, withTheme, useTheme, getInverseTheme } from './parts/theme-context'; | ||
export { default as ThemeProvider } from './theme-provider'; | ||
export type { Theme } from './parts/theme-context'; |
export { LayeringConsumer, withLayering, useLayeringContext } from './parts/layering-context'; | ||
export { default as LayeringProvider } from './layering-provider'; | ||
export { ThemeConsumer, withTheme, useTheme } from './parts/theme-context'; | ||
export { ThemeConsumer, withTheme, useTheme, getInverseTheme } from './parts/theme-context'; | ||
export { default as ThemeProvider } from './theme-provider'; | ||
//# sourceMappingURL=index.js.map |
@@ -5,2 +5,3 @@ import React, { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react'; | ||
export declare const ThemeConsumer: React.Consumer<Theme>; | ||
export declare const getInverseTheme: (theme: Theme) => Theme; | ||
export declare const useTheme: (overwriteValue?: Theme) => Theme; | ||
@@ -7,0 +8,0 @@ export interface ThemeProps { |
@@ -6,2 +6,5 @@ import "core-js/modules/es.function.name.js"; | ||
export var ThemeConsumer = ThemeContext.Consumer; | ||
export var getInverseTheme = function getInverseTheme(theme) { | ||
return theme === 'light' ? 'dark' : 'light'; | ||
}; | ||
export var useTheme = function useTheme(overwriteValue) { | ||
@@ -8,0 +11,0 @@ var themeFromContext = useContext(ThemeContext); |
{ | ||
"name": "@rescui/ui-contexts", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"description": "", | ||
@@ -23,7 +23,7 @@ "license": "Apache-2.0", | ||
"peerDependencies": { | ||
"prop-types": "^15.6.1", | ||
"react": "^16.3.2" | ||
"prop-types": "^15.7.2", | ||
"react": ">=16.8.0 <18" | ||
}, | ||
"devDependencies": { | ||
"@rescui/scripts": "^0.0.1" | ||
"@rescui/scripts": "^0.1.0" | ||
}, | ||
@@ -33,3 +33,3 @@ "scripts": { | ||
}, | ||
"gitHead": "c11a3fcfbba9b9439d18fd13763a76f86036c8ae" | ||
"gitHead": "4fff2c35d8b024e88629ee9a589c5c6433e2c8fd" | ||
} |
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
25501
198