@plasmicapp/react-web
Advanced tools
Comparing version 0.1.23 to 0.1.24
@@ -53,2 +53,3 @@ import * as React from "react"; | ||
export declare function makeFragment(...children: React.ReactNode[]): React.FunctionComponentElement<{}>; | ||
export declare const UNSET: unique symbol; | ||
export declare function wrapWithClassName(element: React.ReactNode, className: string): React.DetailedReactHTMLElement<{ | ||
@@ -55,0 +56,0 @@ key: string | number | undefined; |
@@ -205,2 +205,3 @@ "use strict"; | ||
} | ||
exports.UNSET = Symbol("UNSET"); | ||
function mergeOverrideProps(defaults, overrides) { | ||
@@ -215,13 +216,18 @@ if (!overrides) { | ||
var overrideVal = overrides[key]; | ||
// We use the NONE sentinel of the overrideVal is nil, and is not one of the | ||
// props that we merge by default -- which are className, style, and | ||
// event handlers. This means for all other "normal" props -- like children, | ||
// title, etc -- a nil value will unset the default. | ||
if (overrideVal == null && | ||
key !== "className" && | ||
key !== "style" && | ||
!(key.startsWith("on") && typeof defaultVal === "function")) { | ||
overrideVal = NONE; | ||
if (overrideVal === exports.UNSET) { | ||
delete result[key]; | ||
} | ||
result[key] = mergePropVals(key, defaultVal, overrideVal); | ||
else { | ||
// We use the NONE sentinel of the overrideVal is nil, and is not one of the | ||
// props that we merge by default -- which are className, style, and | ||
// event handlers. This means for all other "normal" props -- like children, | ||
// title, etc -- a nil value will unset the default. | ||
if (overrideVal == null && | ||
key !== "className" && | ||
key !== "style" && | ||
!(key.startsWith("on") && typeof defaultVal === "function")) { | ||
overrideVal = NONE; | ||
} | ||
result[key] = mergePropVals(key, defaultVal, overrideVal); | ||
} | ||
} | ||
@@ -228,0 +234,0 @@ return result; |
{ | ||
"name": "@plasmicapp/react-web", | ||
"version": "0.1.23", | ||
"version": "0.1.24", | ||
"description": "plasmic library for rendering in the presentational style", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
34461
772