Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hig/theme-context

Package Overview
Dependencies
Maintainers
7
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hig/theme-context - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

5

build/index.es.js
import createReactContext from 'create-react-context';
import defaultTheme from '@hig/theme-data/build/json/lightGrayMediumDensityTheme/theme.json';
import defaultTheme from '@hig/theme-data/build/json/webLightMediumDensityTheme/theme.json';
import React, { Component } from 'react';

@@ -58,4 +58,3 @@ import PropTypes from 'prop-types';

null,
function (value) {
var theme = value.resolvedRoles ? value : defaultTheme;
function (theme) {
var isDebugging = process.env.NODE_ENV !== "production";

@@ -62,0 +61,0 @@ var result = isDebugging ? createThemeProxy(theme) : theme;

@@ -8,3 +8,3 @@ 'use strict';

var createReactContext = _interopDefault(require('create-react-context'));
var defaultTheme = _interopDefault(require('@hig/theme-data/build/json/lightGrayMediumDensityTheme/theme.json'));
var defaultTheme = _interopDefault(require('@hig/theme-data/build/json/webLightMediumDensityTheme/theme.json'));
var React = require('react');

@@ -66,4 +66,3 @@ var React__default = _interopDefault(React);

null,
function (value) {
var theme = value.resolvedRoles ? value : defaultTheme;
function (theme) {
var isDebugging = process.env.NODE_ENV !== "production";

@@ -70,0 +69,0 @@ var result = isDebugging ? createThemeProxy(theme) : theme;

@@ -0,1 +1,27 @@

# [@hig/theme-context-v2.0.0](https://github.com/Autodesk/hig/compare/@hig/theme-context@1.0.1...@hig/theme-context@2.0.0) (2019-01-17)
### Bug Fixes
* change default theme LightGray -> WebLight ([7d50a68](https://github.com/Autodesk/hig/commit/7d50a68))
### BREAKING CHANGES
* If you would like to continue using the HIG Light Gray theme now that
it's no longer the default, you will need to specify that theme when you
initialize the `ThemeContext.Provider`. For instance
```
import HIGLightTheme from "@hig/theme-data/build/json/lightGrayMediumDensityTheme/theme.json";
// ...
<ThemeContext.Provider value={HIGLightTheme}>
<ThemeContext.Consumer>
// ...
</ThemeContext.Consumer>
</ThemeContext.Provider>
```
# [@hig/theme-context-v1.0.1](https://github.com/Autodesk/hig/compare/@hig/theme-context@1.0.0...@hig/theme-context@1.0.1) (2018-11-27)

@@ -2,0 +28,0 @@

4

package.json
{
"name": "@hig/theme-context",
"version": "1.0.1",
"version": "2.0.0",
"description": "ThemeContext components to ease adoption of theme data from React components",

@@ -21,3 +21,3 @@ "author": "Autodesk Inc.",

"dependencies": {
"@hig/theme-data": "^1.1.0",
"@hig/theme-data": "^1.5.0",
"create-react-context": "^0.2.3",

@@ -24,0 +24,0 @@ "prop-types": "^15.6.1"

@@ -28,3 +28,3 @@ # ThemeContext component

function MyThemedComponent() {
<ThemeContext.Consumer>{({ resolvedRoles, name }) => (
<ThemeContext.Consumer>{({ resolvedRoles, metadata }) => (
<div style={{

@@ -36,3 +36,3 @@ backgroundColor: resolvedRoles["colorScheme.surfaceLevel200Color"],

}}>
The current theme is "{name}".
The current theme is "${metadata.name}".
</div>

@@ -39,0 +39,0 @@ )}</ThemeContext.Consumer>

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