Skip to content

Commit

Permalink
Fix tiling components not wrapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswilddev committed Jan 11, 2022
1 parent 706767a commit a52b90c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions react-native/components/createTiledComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const globalStyles = StyleSheet.create({
outerView: {
width: `100%`,
flexDirection: `row`,
flexWrap: `wrap`,
},
});

Expand Down
36 changes: 18 additions & 18 deletions react-native/components/createTiledComponent/unit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test(`renders as expected without any children`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
},
}),
Expand Down Expand Up @@ -43,7 +43,7 @@ test(`renders as expected without any children`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
children: [],
},
Expand All @@ -68,7 +68,7 @@ test(`renders as expected with less than one row`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
},
}),
Expand Down Expand Up @@ -98,7 +98,7 @@ test(`renders as expected with less than one row`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
children: [
expect.objectContaining({
Expand Down Expand Up @@ -160,7 +160,7 @@ test(`renders as expected with exactly one row`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
},
}),
Expand Down Expand Up @@ -190,7 +190,7 @@ test(`renders as expected with exactly one row`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
children: [
expect.objectContaining({
Expand Down Expand Up @@ -272,7 +272,7 @@ test(`renders as expected with less than two rows`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
},
}),
Expand Down Expand Up @@ -302,7 +302,7 @@ test(`renders as expected with less than two rows`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
children: [
expect.objectContaining({
Expand Down Expand Up @@ -422,7 +422,7 @@ test(`renders as expected with exactly two rows`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
},
}),
Expand Down Expand Up @@ -452,7 +452,7 @@ test(`renders as expected with exactly two rows`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
children: [
expect.objectContaining({
Expand Down Expand Up @@ -593,7 +593,7 @@ test(`renders as expected with less than three rows`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
},
}),
Expand Down Expand Up @@ -623,7 +623,7 @@ test(`renders as expected with less than three rows`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
children: [
expect.objectContaining({
Expand Down Expand Up @@ -802,7 +802,7 @@ test(`renders as expected with exactly three rows`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
},
}),
Expand Down Expand Up @@ -832,7 +832,7 @@ test(`renders as expected with exactly three rows`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
children: [
expect.objectContaining({
Expand Down Expand Up @@ -1030,7 +1030,7 @@ test(`renders as expected without column spacing`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
},
}),
Expand Down Expand Up @@ -1060,7 +1060,7 @@ test(`renders as expected without column spacing`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
children: [
expect.objectContaining({
Expand Down Expand Up @@ -1252,7 +1252,7 @@ test(`renders as expected without row spacing`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
},
}),
Expand Down Expand Up @@ -1282,7 +1282,7 @@ test(`renders as expected without row spacing`, () => {
type: View,
props: {
onLayout: expect.any(Function),
style: { width: `100%`, flexDirection: `row` },
style: { width: `100%`, flexDirection: `row`, flexWrap: `wrap` },
pointerEvents: `box-none`,
children: [
expect.objectContaining({
Expand Down

0 comments on commit a52b90c

Please sign in to comment.