Socket
Socket
Sign inDemoInstall

react-fit

Package Overview
Dependencies
14
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.1 to 1.6.0

6

dist/cjs/Fit.d.ts

@@ -7,4 +7,4 @@ import React, { Component } from 'react';

};
type FitProps = {
children: React.ReactNode;
export type FitProps = {
children: React.ReactElement | React.ReactElement[];
invertAxis?: boolean;

@@ -35,4 +35,4 @@ invertSecondaryAxis?: boolean;

fit: () => void;
render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
render(): JSX.Element;
}
export {};
"use strict";
'use client';
var __extends = (this && this.__extends) || (function () {

@@ -3,0 +4,0 @@ var extendStatics = function (d, b) {

import Fit from './Fit';
export type { FitProps } from './Fit';
export { Fit };
export default Fit;

@@ -7,4 +7,4 @@ import React, { Component } from 'react';

};
type FitProps = {
children: React.ReactNode;
export type FitProps = {
children: React.ReactElement | React.ReactElement[];
invertAxis?: boolean;

@@ -35,4 +35,4 @@ invertSecondaryAxis?: boolean;

fit: () => void;
render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
render(): JSX.Element;
}
export {};

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

'use client';
var __extends = (this && this.__extends) || (function () {

@@ -2,0 +3,0 @@ var extendStatics = function (d, b) {

import Fit from './Fit';
export type { FitProps } from './Fit';
export { Fit };
export default Fit;
{
"name": "react-fit",
"version": "1.5.1",
"version": "1.6.0",
"description": "Fit a popover element on the screen.",

@@ -19,3 +19,3 @@ "main": "dist/cjs/index.js",

"tsc": "tsc --noEmit",
"unit": "vitest run"
"unit": "vitest"
},

@@ -34,4 +34,2 @@ "keywords": [

"dependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"detect-element-overflow": "^1.3.1",

@@ -46,4 +44,6 @@ "prop-types": "^15.6.0",

"@testing-library/user-event": "^14.4.0",
"@types/react": "*",
"@types/react-dom": "*",
"eslint": "^8.26.0",
"eslint-config-wojtekmaj": "^0.8.2",
"eslint-config-wojtekmaj": "^0.9.0",
"husky": "^8.0.0",

@@ -56,9 +56,23 @@ "jsdom": "^21.1.0",

"rimraf": "^3.0.0",
"typescript": "^5.0.2",
"vitest": "^0.29.2"
"typescript": "^5.0.0",
"vitest": "^0.30.1"
},
"peerDependencies": {
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"@types/react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
},
"publishConfig": {
"access": "public",
"provenance": true
},
"files": [

@@ -65,0 +79,0 @@ "dist",

@@ -12,10 +12,12 @@ [![npm](https://img.shields.io/npm/v/react-fit.svg)](https://www.npmjs.com/package/react-fit) ![downloads](https://img.shields.io/npm/dt/react-fit.svg) [![CI](https://github.com/wojtekmaj/react-fit/workflows/CI/badge.svg)](https://github.com/wojtekmaj/react-fit/actions)

- Do stuff with it!
```js
const ElementWithChild = () => (
<Parent>
<Fit>
<PopoverChild />
</Fit>
</Parent>
);
```tsx
function ElementWithChild() {
return (
<Parent>
<Fit>
<PopoverChild />
</Fit>
</Parent>
);
}
```

@@ -27,6 +29,8 @@

Your project needs to use React 15.5 or later.
Your project needs to use React 16.8 or later.
A bug in React 16.5.x causes React-Fit to crash on [browsers not supporting `display: contents`](https://caniuse.com/#feat=css-display-contents). While React-Fit will continue to work on React 16.5.x, it's highly recommended that you either upgrade to ^16.6.0 or downgrade to <=16.4.2.
### Installation
Add React-Fit to your project by executing `npm install react-fit` or `yarn add react-fit`.
## How does it work?

@@ -33,0 +37,0 @@

import Fit from './Fit';
export type { FitProps } from './Fit';
export { Fit };
export default Fit;

Sorry, the diff of this file is not supported yet

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc