Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autolayout properties #46

Merged
merged 6 commits into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "figma-js",
"version": "1.13.0",
"version": "1.13.2",
"description": "A simple wrapper for the Figma API",
"main": "build/main/index.js",
"types": "build/main/index.d.ts",
Expand Down
36 changes: 36 additions & 0 deletions src/figmaTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,42 @@ export interface FrameBase extends Global {
* This property is only applicable for auto-layout frames
* @default AUTO
*/
readonly primaryAxisSizingMode?: 'FIXED' | 'AUTO';
/**
* When autolayout is enabled
*/
readonly primaryAxisAlignItems?: 'MIN' | 'CENTER' | 'MAX' | 'SPACE_BETWEEN';
/**
* When autolayout is enabled
*/
readonly counterAxisAlignItems?: 'MIN' | 'CENTER' | 'MAX';
/**
* When autolayout is enabled
*/
readonly paddingLeft?: number;
/**
* The padding betweeen the left border of the frame and its children.
* This property is only applicable for auto-layout frames.
* @default 0
*/
readonly paddingRight?: number;
/**
* The padding betweeen the right border of the frame and its children.
* This property is only applicable for auto-layout frames.
* @default 0
*/
readonly paddingTop?: number;
/**
* The padding betweeen the top border of the frame and its children.
* This property is only applicable for auto-layout frames.
* @default 0
*/
readonly paddingBottom?: number;
/**
* The padding betweeen the bottom border of the frame and its children.
* This property is only applicable for auto-layout frames.
* @default 0
*/
readonly counterAxisSizingMode?: 'FIXED' | 'AUTO';
/**
* The horizontal padding between the borders of the frame and its
Expand Down