@blazingly-design/theming
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -1,4 +0,24 @@ | ||
import * as React from 'react'; | ||
import color from 'color'; | ||
import { ThemeProvider as EmotionThemeProvider } from 'emotion-theming'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.ThemeProvider = ThemeProvider; | ||
Object.defineProperty(exports, "withTheme", { | ||
enumerable: true, | ||
get: function () { | ||
return _emotionTheming.withTheme; | ||
} | ||
}); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _color = _interopRequireDefault(require("color")); | ||
var _emotionTheming = require("emotion-theming"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } | ||
const DEFAULT_THEME = { | ||
@@ -39,3 +59,3 @@ borderRadius: 5, | ||
if (SHADE_COLORS.includes(colorKey)) { | ||
resColors[`${colorKey}${percentage}`] = color(colors[colorKey]).darken(percentage / 100).toString(); | ||
resColors[`${colorKey}${percentage}`] = (0, _color.default)(colors[colorKey]).darken(percentage / 100).toString(); | ||
} | ||
@@ -48,3 +68,3 @@ } | ||
export function ThemeProvider(props) { | ||
function ThemeProvider(props) { | ||
let { | ||
@@ -58,7 +78,6 @@ children, | ||
theme.color = createColorShades(theme.color); | ||
return React.createElement(EmotionThemeProvider, { | ||
return React.createElement(_emotionTheming.ThemeProvider, { | ||
theme: theme | ||
}, children); | ||
} | ||
export { withTheme } from 'emotion-theming'; | ||
//# sourceMappingURL=theming.js.map |
{ | ||
"name": "@blazingly-design/theming", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"main": "./lib/theming", | ||
@@ -21,6 +21,7 @@ "license": "MIT", | ||
"@babel/core": "^7.4.5", | ||
"@babel/preset-env": "^7.4.5", | ||
"@babel/preset-react": "^7.0.0", | ||
"@babel/preset-typescript": "^7.3.3" | ||
}, | ||
"gitHead": "0c0aeebb83867a7e1356b218ec4165a1ab18b62a" | ||
"gitHead": "0520ff2e4469f508920fb4710243aca3290bd32b" | ||
} |
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
8160
123
5