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

react-polymorphic-box

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-polymorphic-box - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

### [1.1.1](https://github.com/kripod/react-polymorphic-box/compare/v1.1.0...v1.1.1) (2020-04-15)
## [1.1.0](https://github.com/kripod/react-polymorphic-box/compare/v1.0.4...v1.1.0) (2020-04-09)

@@ -7,0 +9,0 @@

4

dist-node/index.js

@@ -5,6 +5,4 @@ 'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = require('react');
var React = _interopDefault(require('react'));
function _objectWithoutPropertiesLoose(source, excluded) {

@@ -11,0 +9,0 @@ if (source == null) return {};

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

import React from 'react';
import * as React from 'react';
const defaultElement = 'div';

@@ -3,0 +3,0 @@ export const Box = React.forwardRef(({ as, ...restProps }, ref) => {

export { Box } from './Box';

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

import React from 'react';
import * as React from 'react';
import { PropsOf } from './utils';

@@ -3,0 +3,0 @@ export interface BoxOwnProps<E extends React.ElementType = React.ElementType> {

@@ -0,0 +0,0 @@ /// <reference types="react" />

/// <reference types="react" />
export declare type PropsOf<E extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> = JSX.LibraryManagedAttributes<E, React.ComponentPropsWithRef<E>>;

@@ -1,7 +0,7 @@

import React from 'react';
import { forwardRef, createElement } from 'react';
const defaultElement = 'div';
const Box = React.forwardRef(({ as, ...restProps }, ref) => {
const Box = forwardRef(({ as, ...restProps }, ref) => {
const Element = as || defaultElement;
return React.createElement(Element, Object.assign({ ref: ref }, restProps));
return createElement(Element, Object.assign({ ref: ref }, restProps));
});

@@ -8,0 +8,0 @@

{
"name": "react-polymorphic-box",
"description": "Building blocks for strongly typed polymorphic components in React.",
"version": "1.1.0",
"version": "1.1.1",
"license": "MIT",

@@ -35,8 +35,8 @@ "files": [

"@types/react": "^16.9.34",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"@typescript-eslint/eslint-plugin": "^2.28.0",
"@typescript-eslint/parser": "^2.28.0",
"commitizen": "^4.0.4",
"cz-conventional-changelog": "^3.1.0",
"eslint": "^6.8.0",
"eslint-config-airbnb-typescript": "^7.2.0",
"eslint-config-airbnb-typescript": "^7.2.1",
"eslint-config-prettier": "^6.10.1",

@@ -43,0 +43,0 @@ "eslint-plugin-import": "^2.20.2",

@@ -42,3 +42,3 @@ # react-polymorphic-box

```tsx
import React from 'react';
import * as React from 'react';
import { Box, PolymorphicComponentProps } from 'react-polymorphic-box';

@@ -98,3 +98,3 @@

```tsx
import React from 'react';
import * as React from 'react';
import { Box } from 'react-polymorphic-box';

@@ -101,0 +101,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