react-figma
Advanced tools
Comparing version 0.3.2 to 0.4.0
@@ -36,2 +36,3 @@ "use strict"; | ||
var useImageHash_1 = require("../../hooks/useImageHash"); | ||
var useInheritStyle_1 = require("../../hooks/useInheritStyle"); | ||
exports.FRAME_PRESETS = { | ||
@@ -213,5 +214,6 @@ iPhoneX: { | ||
useOnLayoutHandler_1.useOnLayoutHandler(yogaChildProps, props); | ||
return React.createElement("frame", __assign({}, frameProps, yogaChildProps, { innerRef: nodeRef })); | ||
return (React.createElement(useInheritStyle_1.InheritStyleProvider, { style: style }, | ||
React.createElement("frame", __assign({}, frameProps, yogaChildProps, { innerRef: nodeRef })))); | ||
}; | ||
exports.Frame = Frame; | ||
//# sourceMappingURL=Frame.js.map |
@@ -30,2 +30,3 @@ "use strict"; | ||
var useOnLayoutHandler_1 = require("../../hooks/useOnLayoutHandler"); | ||
var useInheritStyle_1 = require("../../hooks/useInheritStyle"); | ||
exports.useCurrentPageChange = function (nodeRef, callback, _isCurrent) { | ||
@@ -50,5 +51,6 @@ React.useEffect(function () { | ||
useOnLayoutHandler_1.useOnLayoutHandler(yogaChildProps, props); | ||
return React.createElement("page", __assign({}, otherProps, yogaChildProps, { innerRef: nodeRef })); | ||
return (React.createElement(useInheritStyle_1.InheritStyleProvider, { style: props.style }, | ||
React.createElement("page", __assign({}, otherProps, yogaChildProps, { innerRef: nodeRef })))); | ||
}; | ||
exports.Page = Page; | ||
//# sourceMappingURL=Page.js.map |
@@ -25,2 +25,3 @@ "use strict"; | ||
var useOnLayoutHandler_1 = require("../../hooks/useOnLayoutHandler"); | ||
var useInheritStyle_1 = require("../../hooks/useInheritStyle"); | ||
var normalizeTextNodeChidren = function (children) { | ||
@@ -32,3 +33,4 @@ return Array.isArray(children) ? children.join('') : children; | ||
useSelectionChange_1.useSelectionChange(nodeRef, props); | ||
var style = __assign({}, __1.StyleSheet.flatten(props.style), transformAutoLayoutToYoga_1.transformAutoLayoutToYoga(props)); | ||
var inheritedStyle = useInheritStyle_1.useInheritStyle(); | ||
var style = __assign({}, (process.env.REACT_FIGMA_STYLE_INHERITANCE_ENABLED ? inheritedStyle : {}), __1.StyleSheet.flatten(props.style), transformAutoLayoutToYoga_1.transformAutoLayoutToYoga(props)); | ||
var children = normalizeTextNodeChidren(props.children); | ||
@@ -35,0 +37,0 @@ var charactersByChildren = useTextChildren_1.useTextChildren(nodeRef); |
{ | ||
"name": "react-figma", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"description": "Render React components to Figma", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
357188
290
5032
5