New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

inlines

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inlines - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

8

dist/index.js

@@ -1,6 +0,6 @@

import { createElement } from 'react';
import { createElement, forwardRef } from 'react';
import { css, keyframes } from 'goober';
import { transform } from './transform.js';
const styled = new Proxy((as, style) => {
const Styled = (props) => createElement(as, transform(props, props.style
const Styled = forwardRef((props, ref) => createElement(as, transform(props, props.style
? {

@@ -10,3 +10,3 @@ ...style,

}
: style), props.children);
: style, ref), props.children));
return Styled;

@@ -21,3 +21,3 @@ }, {

const as = p.toLowerCase();
const Styled = (props) => createElement(as, props.style ? transform(props, props.style) : props, props.children);
const Styled = forwardRef((props, ref) => createElement(as, transform(props, props.style, ref), props.children));
t[p] = Styled;

@@ -24,0 +24,0 @@ }

@@ -14,4 +14,4 @@ import { css, keyframes } from 'goober';

};
export const transform = (p, style) => {
const props = { ...p };
export const transform = (p, style, ref) => {
const props = { ...p, ref };
const s = {};

@@ -18,0 +18,0 @@ for (const key in style) {

{
"name": "inlines",
"description": "When you just want to use the style prop in React",
"version": "0.1.2",
"version": "0.2.0",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "src/index.ts",

@@ -1,2 +0,2 @@

import { createElement } from 'react'
import { createElement, forwardRef } from 'react'
import { css, keyframes } from 'goober'

@@ -8,3 +8,3 @@ import { transform } from './transform.js'

(as: As, style: Style) => {
const Styled = (props: Props) =>
const Styled = forwardRef((props: Props, ref) =>
createElement(

@@ -19,6 +19,8 @@ as,

}
: style
: style,
ref
),
props.children
)
)

@@ -34,8 +36,9 @@ return Styled

const as = p.toLowerCase()
const Styled = (props: Props) =>
const Styled = forwardRef((props: Props, ref) =>
createElement(
as,
props.style ? transform(props, props.style) : props,
transform(props, props.style, ref),
props.children
)
)
t[p] = Styled

@@ -42,0 +45,0 @@ }

@@ -16,4 +16,4 @@ import { css, keyframes } from 'goober'

export const transform = (p: Props, style: Style) => {
const props = { ...p }
export const transform = (p: Props, style: Style, ref: any) => {
const props = { ...p, ref }
const s = {} as Style

@@ -20,0 +20,0 @@ for (const key in style) {

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