Socket
Socket
Sign inDemoInstall

@callstack/react-theme-provider

Package Overview
Dependencies
Maintainers
9
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@callstack/react-theme-provider - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

15

lib/createWithTheme.js

@@ -73,17 +73,6 @@ "use strict";

return React.createElement(ThemeContext.Consumer, null, function (theme) {
var merged = _this2._merge(theme, rest.theme);
var element = React.createElement(Comp, _extends({}, rest, {
theme: merged,
return React.createElement(Comp, _extends({}, rest, {
theme: _this2._merge(theme, rest.theme),
ref: _reactThemeProviderForwardedRef
}));
if (rest.theme && merged !== rest.theme) {
// If a theme prop was passed, expose it to the children
return React.createElement(ThemeProvider, {
theme: merged
}, element);
}
return element;
});

@@ -90,0 +79,0 @@ };

3

package.json
{
"name": "@callstack/react-theme-provider",
"version": "2.0.1",
"version": "2.0.2",
"description": "Theme provider for react and react-naitve applications",

@@ -43,2 +43,3 @@ "main": "./lib/index.js",

"@callstack/eslint-config": "^3.0.2",
"@types/hoist-non-react-statics": "^3.3.1",
"@types/react": "^16.8.8",

@@ -45,0 +46,0 @@ "eslint": "^5.15.1",

@@ -5,2 +5,3 @@ // Type definitions for @callstack/react-theme-provider 1.0.2

import * as React from 'react';
import hoistNonReactStatics = require('hoist-non-react-statics');

@@ -12,7 +13,8 @@ type $Without<T, K> = Pick<T, Exclude<keyof T, K>>;

ThemeProvider: React.ComponentType<{ theme?: Theme }>;
withTheme: <Props extends { theme: Theme }>(
Comp: React.ComponentType<Props>
withTheme: <Props extends { theme: Theme }, C>(
WrappedComponent: React.ComponentType<Props> & C
) => React.ComponentType<
$Without<Props, 'theme'> & { theme?: $DeepPartial<Theme> }
>;
> &
hoistNonReactStatics.NonReactStatics<typeof WrappedComponent>;
useTheme(overrides?: $DeepPartial<Theme>): Theme;

@@ -19,0 +21,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc