react-figma
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -33,3 +33,6 @@ "use strict"; | ||
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 style = __assign({}, (process.env.REACT_FIGMA_STYLE_INHERITANCE_ENABLED ? inheritedStyle : {}), (process.env.REACT_FIGMA_WEB_DEFAULTS_ENABLED && props.style && props.style.display === 'block' | ||
? { width: '100%' } | ||
: {}), __1.StyleSheet.flatten(props.style), transformAutoLayoutToYoga_1.transformAutoLayoutToYoga(props)); | ||
console.log(style); | ||
var children = normalizeTextNodeChidren(props.children); | ||
@@ -36,0 +39,0 @@ var charactersByChildren = useTextChildren_1.useTextChildren(nodeRef); |
@@ -17,4 +17,14 @@ "use strict"; | ||
var View = function (props) { | ||
var style = (props.style && __1.StyleSheet.flatten(props.style)) || {}; | ||
if (props.children) { | ||
return (React.createElement(__1.Frame, __assign({}, props, { style: [{ backgroundColor: 'transparent' }, props.style && __1.StyleSheet.flatten(props.style)] }))); | ||
return (React.createElement(__1.Frame, __assign({}, props, { style: [ | ||
{ backgroundColor: 'transparent' }, | ||
(process.env.REACT_FIGMA_WEB_DEFAULTS_ENABLED && | ||
(style.display === 'flex' || style.display === 'inline-flex') && { | ||
flexDirection: 'row' | ||
}) || | ||
undefined, | ||
(process.env.REACT_FIGMA_WEB_DEFAULTS_ENABLED && { alignItems: 'stretch' }) || undefined, | ||
style | ||
] }))); | ||
} | ||
@@ -21,0 +31,0 @@ else { |
{ | ||
"name": "react-figma", | ||
"version": "0.4.0", | ||
"version": "0.5.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
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
358282
5045
8