react-justified-layout-ts 1.1.12 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -99,9 +99,7 @@ function TSJustifiedLayout({ children, layoutItems, itemSpacing = 10, rowSpacing
|
|
|
99
99
|
gap: itemSpacing,
|
|
100
100
|
marginBottom: rowSpacing,
|
|
101
101
|
aspectRatio: width / value.height
|
|
102
|
-
} }, value.items.map((
|
|
103
|
-
return react_1.default.createElement("div", { style: isLastRow ? { aspectRatio: aspectRatio } : { flex: aspectRatio } }, renderChildren());
|
|
104
|
-
}));
|
|
102
|
+
} }, value.items.map(() => renderChildren()));
|
|
105
103
|
}))));
|
|
106
104
|
}
|
|
107
105
|
exports.TSJustifiedLayout = TSJustifiedLayout;
|
package/package.json
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-justified-layout-ts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.14",
|
|
4
4
|
"description": "A component based off Flickr's justified layout that is compatible with Typescript",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
|
-
"
|
|
7
|
-
".": {
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"default": "./dist/main.js"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
12
7
|
"scripts": {
|
|
13
8
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
9
|
"typescript": "tsc",
|
|
@@ -114,11 +114,7 @@ function TSJustifiedLayout({
|
|
|
114
114
|
marginBottom: rowSpacing,
|
|
115
115
|
aspectRatio: width / value.height}
|
|
116
116
|
}>
|
|
117
|
-
{value.items.map((
|
|
118
|
-
return <div style={isLastRow ? {aspectRatio: aspectRatio} : {flex: aspectRatio}}>
|
|
119
|
-
{renderChildren()}
|
|
120
|
-
</div>;
|
|
121
|
-
})}
|
|
117
|
+
{value.items.map(() => renderChildren())}
|
|
122
118
|
</div>
|
|
123
119
|
})}
|
|
124
120
|
</div>
|