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

react-expand

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-expand - npm Package Compare versions

Comparing version 2.6.0 to 2.7.0

build/src/Components/helpers/isBrowserExist.d.ts

2

build/src/Components/Modal/Modal.d.ts
/// <reference types="react" />
import * as React from "react";
import * as PropTypes from "prop-types";
import { ModalProps } from "./ModalProps";
import { ExpandContext } from "../ExpandController";
import { ModalProps } from "./ModalProps";
export declare class Modal extends React.Component<ModalProps> {

@@ -7,0 +7,0 @@ static readonly contextTypes: {

@@ -7,3 +7,4 @@ export * from "./Components/Tabs";

export * from "./Components/ExpandControl";
export * from "./Components/StaticContainer";
export * from "./Components/ExpandController";
export * from "./Components/ControlledExpandElement";
{
"name": "react-expand",
"version": "2.6.0",
"version": "2.7.0",
"description": "Simple element expand state controlling",

@@ -36,2 +36,3 @@ "main": "build/index.js",

"@types/react": "^16.0.31",
"@types/react-dom": "^16.0.5",
"@types/sinon": "^2.3.3",

@@ -38,0 +39,0 @@ "awesome-typescript-loader": "^3.2.2",

@@ -17,3 +17,3 @@ # React Expand

Controlling expand state
```jsx
```tsx
import * as React from "react";

@@ -335,1 +335,40 @@

```
### Server-side render
Because `ReactDOM.createPortal` does not support SSR, you must modify code for correct work of `<Modal/>` component
Client side
```jsx
export class Layout extends React.Component {
public render(): React.ReactNode {
return (
<ExpandController>
<Modal modalId="some-id" defaultOpened>
...
</Modal>
</ExpandController>
);
}
}
```
Server side
```tsx
app.get("*", (request, response) => {
ReactDOMServer.renderToNodeStream(
<html {...htmlAttrs} data-version={version}>
<body className={StaticContainer.childrenLength ? Modal.defaultProps.activeBodyClassName : ""}>
<div id="app">
<Layout />
</div>
<div id={ModalContainer.containerId}>
{StaticContainer.renderStatic()}
</div>
</body>
</html>
).pipe(response);
})
```
You also can use [`<StaticContainer/>`](src/Components/StaticContainer/StaticContainer.tsx) and [`<OuterContextPorvider/>`](src/Components/StaticContainer/OuterContextProvider.tsx) in your needs.

Sorry, the diff of this file is too big to display

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