react-figma
Advanced tools
Comparing version 0.0.39 to 0.0.40
{ | ||
"name": "react-figma", | ||
"version": "0.0.39", | ||
"version": "0.0.40", | ||
"description": "Render React components to Figma", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -11,2 +11,3 @@ "use strict"; | ||
var blendMixin_1 = require("../mixins/blendMixin"); | ||
var isValidSize_1 = require("../helpers/isValidSize"); | ||
var textNodePropsAssign = propsAssign_1.propsAssign([ | ||
@@ -41,3 +42,12 @@ 'characters', | ||
} | ||
textNode.textAutoResize = props.textAutoResize || (props.hasDefinedWidth ? 'HEIGHT' : 'WIDTH_AND_HEIGHT'); | ||
if (props.hasDefinedWidth && | ||
isValidSize_1.isValidSize(props.width) && | ||
isValidSize_1.isValidSize(textNode.height) && | ||
!props.textAutoResize) { | ||
textNode.resize(props.width, textNode.height); | ||
textNode.textAutoResize = 'HEIGHT'; | ||
} | ||
else { | ||
textNode.textAutoResize = props.textAutoResize || 'WIDTH_AND_HEIGHT'; | ||
} | ||
textNodePropsAssign(textNode)(props); | ||
@@ -44,0 +54,0 @@ } |
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
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
302143
4623