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

@chakra-ui/react-env

Package Overview
Dependencies
Maintainers
3
Versions
210
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/react-env - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

8

package.json
{
"name": "@chakra-ui/react-env",
"version": "2.0.6",
"version": "2.0.7",
"description": "Component and hook for handling window and document object in iframe or ssr environment",

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

},
"dependencies": {
"@chakra-ui/utils": "2.0.6"
},
"peerDependencies": {

@@ -52,4 +49,3 @@ "react": ">=18"

"build:fast": "JSX=1 tsup src/index.ts"
},
"readme": "# @chakra-ui/react-env\n\nReact component and hook for handling window and document object in iframe or\nssr environment\n\n> This is an internal utility, not intended for public usage.\n\n## Installation\n\n```sh\nyarn add @chakra-ui/react-env\n# or\nnpm i @chakra-ui/react-env\n```\n\n## Usage\n\nTo get it working, you need to wrap your app in `EnvironmentProvider` and call\nthe `useEnvironment` hook anywhere in your app to get access to the correct\n`window` and `document`.\n\n```jsx\nimport { EnvironmentProvider } from \"@chakra-ui/react-env\"\n\n// in your App\nconst App = ({ children }) => {\n return <EnvironmentProvider>{children}</EnvironmentProvider>\n}\n\n// read the environment\nconst WindowSize = () => {\n const { window } = useEnvironment()\n return (\n <pre>\n {JSON.stringify({\n w: window.innerWidth,\n h: window.innerHeight,\n })}\n </pre>\n )\n}\n```\n\nIf you wrap specific aspects of your app within an `iframe`, you'll need to wrap\nthe content in the iframe in `EnvironmentProvider` to provide the correct\n`window` and `document` to its content.\n\n```jsx\n// in your app\nconst EmbeddedIFrame = () => {\n return (\n <Frame>\n <EnvironmentProvider>\n <WindowSize />\n </EnvironmentProvider>\n </Frame>\n )\n}\n```\n\n## Contribution\n\nYes please! See the\n[contributing guidelines](https://github.com/chakra-ui/chakra-ui/blob/master/CONTRIBUTING.md)\nfor details.\n\n## Licence\n\nThis project is licensed under the terms of the\n[MIT license](https://github.com/chakra-ui/chakra-ui/blob/master/LICENSE).\n"
}
}
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