react-figma
Advanced tools
Comparing version 0.0.1-alpha.23 to 0.0.1-alpha.24
import { LayoutProps } from '../types'; | ||
export declare const layoutMixin: (node: LayoutMixin) => (props: LayoutProps) => void; | ||
export declare const layoutMixin: (node: (LayoutMixin & DocumentNode) | (LayoutMixin & PageNode) | (LayoutMixin & SliceNode) | (LayoutMixin & FrameNode) | (LayoutMixin & ComponentNode) | (LayoutMixin & InstanceNode) | (LayoutMixin & BooleanOperationNode) | (LayoutMixin & VectorNode) | (LayoutMixin & StarNode) | (LayoutMixin & LineNode) | (LayoutMixin & EllipseNode) | (LayoutMixin & PolygonNode) | (LayoutMixin & RectangleNode) | (LayoutMixin & TextNode)) => (props: LayoutProps) => void; |
@@ -16,3 +16,3 @@ "use strict"; | ||
} | ||
if (props.width && props.height) { | ||
if (props.width && props.height && node.type !== 'LINE') { | ||
if (props.isWithoutConstraints) { | ||
@@ -25,3 +25,11 @@ node.resizeWithoutConstraints(props.width, props.height); | ||
} | ||
if (props.width && node.type === 'LINE') { | ||
if (props.isWithoutConstraints) { | ||
node.resizeWithoutConstraints(props.width, 0); | ||
} | ||
else { | ||
node.resize(props.width, 0); | ||
} | ||
} | ||
}; }; | ||
//# sourceMappingURL=layoutMixin.js.map |
import { LineProps } from '../components/line/Line'; | ||
export declare const line: (node: RectangleNode) => (props: LineProps) => RectangleNode | LineNode; | ||
export declare const line: (node: RectangleNode) => (props: LineProps) => LineNode | RectangleNode; |
{ | ||
"name": "react-figma", | ||
"version": "0.0.1-alpha.23", | ||
"version": "0.0.1-alpha.24", | ||
"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 @@ "main": "./dist/index.js", |
@@ -12,3 +12,3 @@ <p align="center"><img src="./logo.svg" width="128"></p> | ||
* 💡 Inspired by [react-sketchapp](https://github.com/airbnb/react-sketchapp). | ||
* 🍬 Compatible with [react-native](https://facebook.github.io/react-native/), [react-sketchapp](https://github.com/airbnb/react-sketchapp) API. | ||
* 🎨 Designed to create manageable design systems. | ||
@@ -25,3 +25,3 @@ * 🦄 Flexible layouts support with [Yoga Layout](https://yogalayout.com/) | ||
import * as React from 'react'; | ||
import { Page, Rectangle, Text } from 'react-figma'; | ||
import { Page, View, Text } from 'react-figma'; | ||
@@ -31,4 +31,6 @@ export const App = () => { | ||
<Page name="New page"> | ||
<Rectangle style={{ width: 200, height: 100, backgroundColor: '#dd55aa' }} /> | ||
<Text characters="text" style={{ color: '#ffffff' }} /> | ||
<View> | ||
<View style={{ width: 200, height: 100, backgroundColor: '#dd55aa' }} /> | ||
<Text characters="text" style={{ color: '#ffffff' }} /> | ||
</View> | ||
</Page> | ||
@@ -109,2 +111,15 @@ ); | ||
## [Docs](https://react-figma.now.sh/) | ||
* [API Overview](https://react-figma.now.sh/docs/API.html) | ||
+ [render](https://react-figma.now.sh/src/render.html) | ||
+ [Page](https://react-figma.now.sh/src/components/page/Page.html) | ||
+ [Frame](https://react-figma.now.sh/src/components/frame/Frame.html) | ||
+ [View](https://react-figma.now.sh/src/components/view/View.html) | ||
+ [Text](https://react-figma.now.sh/src/components/text/Text.html) | ||
+ [Image](https://react-figma.now.sh/src/components/Image/Image.html) | ||
+ ... | ||
* [Styling](https://react-figma.now.sh/docs/styling.html) | ||
* [Architecture](https://react-figma.now.sh/docs/architecture.html) | ||
## Examples | ||
@@ -111,0 +126,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
255792
3942
174