react-figma
Advanced tools
Comparing version 0.25.0 to 0.26.0
@@ -27,2 +27,3 @@ "use strict"; | ||
var useNodeIdCallback_1 = require("../../hooks/useNodeIdCallback"); | ||
var constants_1 = require("../../helpers/constants"); | ||
var normalizeTextNodeChidren = function (children) { | ||
@@ -47,3 +48,3 @@ return Array.isArray(children) ? children.join('') : children; | ||
var hasDefinedWidth = textProps.width || style.maxWidth; | ||
var loadedFont = useFontName_1.useFontName(textProps.fontName || { family: 'Roboto', style: 'Regular' }); | ||
var loadedFont = useFontName_1.useFontName(textProps.fontName || constants_1.DEFAULT_FONT); | ||
var yogaProps = useYogaLayout_1.useYogaLayout(__assign({ nodeRef: nodeRef }, textProps, { loadedFont: loadedFont })); | ||
@@ -50,0 +51,0 @@ useOnLayoutHandler_1.useOnLayoutHandler(yogaProps, props); |
{ | ||
"name": "react-figma", | ||
"version": "0.25.0", | ||
"version": "0.26.0", | ||
"description": "Render React components to Figma", | ||
@@ -51,3 +51,3 @@ "scripts": { | ||
"css-loader": "^3.2.0", | ||
"figma-api-stub": "0.0.48", | ||
"figma-api-stub": "0.0.54", | ||
"file-loader": "^6.2.0", | ||
@@ -54,0 +54,0 @@ "html-webpack-inline-source-plugin": "^0.0.10", |
@@ -16,2 +16,3 @@ "use strict"; | ||
var constraintsMixin_1 = require("../mixins/constraintsMixin"); | ||
var constants_1 = require("../helpers/constants"); | ||
var textNodePropsAssign = propsAssign_1.propsAssign([ | ||
@@ -45,3 +46,3 @@ 'characters', | ||
}); | ||
var defaultFont = { family: 'Roboto', style: 'Regular' }; | ||
var defaultFont = constants_1.DEFAULT_FONT; | ||
exports.text = function (node) { return function (props) { | ||
@@ -48,0 +49,0 @@ var textNode = node || props.node || figma.createText(); |
@@ -56,2 +56,3 @@ "use strict"; | ||
var isEqualFontStyle_1 = require("./helpers/isEqualFontStyle"); | ||
var constants_1 = require("./helpers/constants"); | ||
var getInitialTree = function (node) { | ||
@@ -262,3 +263,3 @@ return { | ||
} | ||
var _b = textProperties.fontName, fontName = _b === void 0 ? { family: 'Roboto', style: 'Regular' } : _b; | ||
var _b = textProperties.fontName, fontName = _b === void 0 ? constants_1.DEFAULT_FONT : _b; | ||
if (loadedFont && | ||
@@ -265,0 +266,0 @@ fontName && |
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
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
486277
356
7345