react-justified-layout-ts 2.0.1 → 2.0.2
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.
package/package.json
CHANGED
|
@@ -100,9 +100,8 @@ function TSJustifiedLayout({
|
|
|
100
100
|
function renderRow(aspectRatio: ElementDimensions, isLastRow: boolean) {
|
|
101
101
|
childNodeCounter++;
|
|
102
102
|
return <div style={{
|
|
103
|
-
maxHeight: '100%',
|
|
104
103
|
aspectRatio: aspectRatio,
|
|
105
|
-
|
|
104
|
+
flex: aspectRatio,
|
|
106
105
|
...containerStyle
|
|
107
106
|
}}>
|
|
108
107
|
{children[childNodeCounter]}
|
|
@@ -117,8 +116,7 @@ function TSJustifiedLayout({
|
|
|
117
116
|
display: "flex",
|
|
118
117
|
flexDirection: "row",
|
|
119
118
|
gap: itemSpacing,
|
|
120
|
-
marginBottom: rowSpacing
|
|
121
|
-
aspectRatio: width / value.height
|
|
119
|
+
marginBottom: rowSpacing
|
|
122
120
|
}
|
|
123
121
|
}>
|
|
124
122
|
{value.items.map((aspectRatio) => renderRow(aspectRatio, isLastRow))}
|
|
@@ -203,7 +203,7 @@ const displayedImages = [
|
|
|
203
203
|
export const Primary: Story = {
|
|
204
204
|
name: "Complex Elements",
|
|
205
205
|
args: {
|
|
206
|
-
width:
|
|
206
|
+
width: 491,
|
|
207
207
|
showWidows: true,
|
|
208
208
|
targetRowHeight: undefined,
|
|
209
209
|
rowSpacing: undefined,
|
|
@@ -212,7 +212,7 @@ export const Primary: Story = {
|
|
|
212
212
|
targetRowHeightTolerance: undefined,
|
|
213
213
|
children: displayedImages.map(value => <>
|
|
214
214
|
<div style={{top: 16, left: 16, position: "absolute"}}>Testing</div>
|
|
215
|
-
|
|
215
|
+
<img src={value.webp || value.src}/>
|
|
216
216
|
</>
|
|
217
217
|
),
|
|
218
218
|
containerStyle: {position: 'relative'}
|