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

@theorem/react

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@theorem/react - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

5

CHANGELOG.md

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

# 2.2.0
- ErrorBoundary: fallback option
- UnderConstruction: inline option
# 2.1.0

@@ -2,0 +7,0 @@

7

dist/ErrorBoundary.d.ts
import React from "react";
declare type Props = {
children: React.ReactNode;
reportError: (error: Error) => void;
} & ({
component: React.ComponentType<{
reset: () => void;
}>;
reportError: (error: Error) => void;
};
} | {
fallback: React.ReactNode;
});
export declare class ErrorBoundary extends React.Component<Props> {

@@ -10,0 +13,0 @@ state: {

@@ -31,4 +31,7 @@ var __extends = (this && this.__extends) || (function () {

if (this.state.error) {
var Component = this.props.component;
return React.createElement(Component, { reset: this.reset });
if ("component" in this.props) {
var Component = this.props.component;
return React.createElement(Component, { reset: this.reset });
}
return this.props.fallback;
}

@@ -35,0 +38,0 @@ return this.props.children;

import React from "react";
declare type Props = {
children: React.ReactNode;
inline?: boolean;
onlyWhen?: boolean;

@@ -5,0 +6,0 @@ };

@@ -13,7 +13,7 @@ import React from "react";

export function UnderConstruction(props) {
var children = props.children, onlyWhen = props.onlyWhen;
var children = props.children, inline = props.inline, onlyWhen = props.onlyWhen;
if (onlyWhen !== undefined && !onlyWhen)
return React.createElement(React.Fragment, null, children);
return (React.createElement("div", { className: outer },
return (React.createElement("div", { className: outer, style: { display: inline ? "inline-block" : undefined } },
React.createElement("div", { className: inner }, children)));
}
{
"name": "@theorem/react",
"version": "2.1.1",
"version": "2.2.0",
"description": "Theorem React tools",

@@ -5,0 +5,0 @@ "peerDependencies": {

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