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

onno-react

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onno-react - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

13

cjs/index.js

@@ -85,4 +85,4 @@ "use strict"

const { propsKeys, styleKeys } = renderer.options
const transform = (styleObject) => {
const renderedStyle = renderer(styleObject)
const transform = (styleObject, theme) => {
const renderedStyle = renderer(Object.assign({ theme }, styleObject))
const mergedStyle = renderedStyle && merge(renderedStyle)

@@ -94,3 +94,3 @@ return Object.keys(styleObject).reduce((result, key) => {

const value = result[key]
if (isObject(value)) result[key] = transform(value)
if (isObject(value)) result[key] = transform(value, theme)
return result

@@ -138,3 +138,3 @@ }, Object.assign({}, styleObject, mergedStyle))

if (result) {
if (transformer) result = transformer(result)
if (transformer) result = transformer(result, theme)
if (query) result = { [query]: result }

@@ -733,3 +733,3 @@ styles.push(result)

const globalStyle = variant({
const gst = variant({
propsKeys: ["globalStyle", "gst"],

@@ -739,2 +739,5 @@ themeKeys: ["globalStyles"],

})
const globalStyle = (props) => gst(Object.assign({ gst: "." }, props))
globalStyle.options = gst.options
globalStyle.type = gst.type
const buttonStyle = variant({

@@ -741,0 +744,0 @@ propsKeys: ["buttonStyle", "bst"],

@@ -81,4 +81,4 @@ import { oneOfType, number, string, objectOf, arrayOf } from "prop-types"

const { propsKeys, styleKeys } = renderer.options
const transform = (styleObject) => {
const renderedStyle = renderer(styleObject)
const transform = (styleObject, theme) => {
const renderedStyle = renderer(Object.assign({ theme }, styleObject))
const mergedStyle = renderedStyle && merge(renderedStyle)

@@ -90,3 +90,3 @@ return Object.keys(styleObject).reduce((result, key) => {

const value = result[key]
if (isObject(value)) result[key] = transform(value)
if (isObject(value)) result[key] = transform(value, theme)
return result

@@ -134,3 +134,3 @@ }, Object.assign({}, styleObject, mergedStyle))

if (result) {
if (transformer) result = transformer(result)
if (transformer) result = transformer(result, theme)
if (query) result = { [query]: result }

@@ -729,3 +729,3 @@ styles.push(result)

const globalStyle = variant({
const gst = variant({
propsKeys: ["globalStyle", "gst"],

@@ -735,2 +735,5 @@ themeKeys: ["globalStyles"],

})
const globalStyle = (props) => gst(Object.assign({ gst: "." }, props))
globalStyle.options = gst.options
globalStyle.type = gst.type
const buttonStyle = variant({

@@ -737,0 +740,0 @@ propsKeys: ["buttonStyle", "bst"],

{
"name": "onno-react",
"license": "MIT",
"version": "0.0.14",
"version": "0.0.15",
"description": "Onno propTypes for React",

@@ -16,5 +16,5 @@ "homepage": "https://github.com/wagerfield/onno/tree/master/packages/onno-react#readme",

"keywords": [
"css-in-js",
"styled-system",
"react"
"onno",
"react",
"css-in-js"
],

@@ -31,6 +31,6 @@ "main": "cjs/index.js",

"@types/prop-types": "15.7.1",
"onno": "0.0.14",
"onno": "0.0.15",
"prop-types": "15.7.2"
},
"gitHead": "4c5ee213e4a5d03518f17c1a2428763792ff4df7"
"gitHead": "c73461d54c93bd3bcb63fcfcb8a8c94ebd1bca18"
}

@@ -107,5 +107,5 @@ # [![onno-react](https://raw.githubusercontent.com/wagerfield/onno/master/assets/onno-react.png)][onno]

[license]: https://github.com/wagerfield/onno/blob/master/license
[bundlephobia]: https://bundlephobia.com/result?p=onno
[bundlephobia]: https://bundlephobia.com/result?p=onno-react
[circleci]: https://circleci.com/gh/wagerfield/onno
[codecov]: https://codecov.io/gh/wagerfield/onno
[react-prop-types]: https://reactjs.org/docs/typechecking-with-proptypes
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