react-figma
Advanced tools
Comparing version 0.0.43 to 0.0.44
import { CommonStyle } from '../types'; | ||
declare type StyleProp<P, T> = { | ||
[P in keyof T]: Partial<CommonStyle>; | ||
}; | ||
export declare class StyleSheet { | ||
static create<T extends { | ||
[P in keyof T]: Partial<CommonStyle>; | ||
}>(styles: T): T; | ||
static create<T extends StyleProp<any, T>>(styles: T): T; | ||
static flatten<C extends Partial<CommonStyle>>(styles: C | C[] | void): C; | ||
@@ -10,2 +11,4 @@ static resolve<T extends { | ||
}>(value: T): T; | ||
static compose<C1 extends StyleProp<any, C1>, C2 extends StyleProp<any, C2>>(style1: C1, style2: C2): C1 & C2; | ||
} | ||
export {}; |
@@ -31,2 +31,11 @@ "use strict"; | ||
}; | ||
StyleSheet.compose = function (style1, style2) { | ||
var result = __assign({}, style1, style2); | ||
Object.keys(style1).map(function (style1Key) { | ||
if (style2[style1Key]) { | ||
result[style1Key] = __assign({}, style1[style1Key], style2[style1Key]); | ||
} | ||
}); | ||
return result; | ||
}; | ||
return StyleSheet; | ||
@@ -33,0 +42,0 @@ }()); |
{ | ||
"name": "react-figma", | ||
"version": "0.0.43", | ||
"version": "0.0.44", | ||
"description": "Render React components to Figma", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
306248
4679