Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-figma

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-figma - npm Package Compare versions

Comparing version 0.0.30 to 0.0.31

helpers/isValidSize.d.ts

8

mixins/layoutMixin.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var isValidSize = function (size) {
return size && size >= 0.01;
};
var isValidSize_1 = require("../helpers/isValidSize");
exports.layoutMixin = function (node) { return function (props) {

@@ -19,3 +17,3 @@ if (props.relativeTransform) {

}
if (isValidSize(props.width) && isValidSize(props.height) && node.type !== 'LINE') {
if (isValidSize_1.isValidSize(props.width) && isValidSize_1.isValidSize(props.height) && node.type !== 'LINE') {
if (props.isWithoutConstraints) {

@@ -28,3 +26,3 @@ node.resizeWithoutConstraints(props.width, props.height);

}
if (isValidSize(props.width) && node.type === 'LINE') {
if (isValidSize_1.isValidSize(props.width) && node.type === 'LINE') {
if (props.isWithoutConstraints) {

@@ -31,0 +29,0 @@ node.resizeWithoutConstraints(props.width, 0);

{
"name": "react-figma",
"version": "0.0.30",
"version": "0.0.31",
"description": "This plugin template uses Typescript. If you are familiar with Javascript, Typescript will look very familiar. In fact, valid Javascript code is already valid Typescript code.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -28,6 +28,6 @@ <p align="center"><img src="./logo.svg" width="128"></p>

return (
<Page name="New page">
<Page name="New page" isCurrent>
<View>
<View style={{ width: 200, height: 100, backgroundColor: '#dd55aa' }} />
<Text characters="text" style={{ color: '#ffffff' }} />
<Text style={{ color: '#ffffff' }}>text</Text>
</View>

@@ -34,0 +34,0 @@ </Page>

@@ -11,2 +11,3 @@ "use strict";

var blendMixin_1 = require("../mixins/blendMixin");
var isValidSize_1 = require("../helpers/isValidSize");
var textNodePropsAssign = propsAssign_1.propsAssign([

@@ -42,3 +43,9 @@ 'characters',

}
textNode.textAutoResize = props.textAutoResize || 'WIDTH_AND_HEIGHT';
if (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);

@@ -45,0 +52,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc