From bb3db3ddefbd918e039dda882312ca31333e457c Mon Sep 17 00:00:00 2001 From: eyalabadi98 Date: Sat, 22 Dec 2018 17:34:02 +0800 Subject: [PATCH 1/3] Added Background Color --- src/MasonryList/Column.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MasonryList/Column.js b/src/MasonryList/Column.js index d20c793..cb61904 100644 --- a/src/MasonryList/Column.js +++ b/src/MasonryList/Column.js @@ -14,7 +14,7 @@ export default class Column extends React.PureComponent { columnKey: PropTypes.string, imageContainerStyle: PropTypes.object, spacing: PropTypes.number, - + backgroundColor: PropTypes.string, onPressImage: PropTypes.func, onLongPressImage: PropTypes.func, displayImageViewer: PropTypes.bool.isRequired, @@ -145,7 +145,7 @@ export default class Column extends React.PureComponent { width: this.state.columnWidth, overflow: "hidden", flex: 1, - backgroundColor: "#fff", + backgroundColor: this.props.backgroundColor, flexDirection: "column" }}> Date: Sat, 22 Dec 2018 17:34:42 +0800 Subject: [PATCH 2/3] Added Background Color Type --- src/MasonryList/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MasonryList/index.js b/src/MasonryList/index.js index 8d155e2..b1c2fa0 100644 --- a/src/MasonryList/index.js +++ b/src/MasonryList/index.js @@ -20,7 +20,7 @@ export default class MasonryList extends React.Component { renderIndividualMasonryHeader: PropTypes.func, renderIndividualMasonryFooter: PropTypes.func, masonryFlatListColProps: PropTypes.object, - + backgroundColor: PropTypes.string, onPressImage: PropTypes.func, onLongPressImage: PropTypes.func, displayImageViewer: PropTypes.bool.isRequired, @@ -171,7 +171,7 @@ export default class MasonryList extends React.Component { return ( this._setParentDimensions(event)}> Date: Sat, 22 Dec 2018 17:36:07 +0800 Subject: [PATCH 3/3] Updated Readme to reflect background color --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e0045c9..6725550 100644 --- a/README.md +++ b/README.md @@ -275,6 +275,7 @@ render() { | `images` | An array of objects. `uri` is a required field. EX. `[{uri: "https://luehangs.site/pic-chat-app-images/beautiful-blond-fishnet-stockings-48134.jpg"}, {uri: "https://luehangs.site/pic-chat-app-images/beautiful-blond-blonde-hair-478544.jpg"}]` | `Array` | Required | | `columns` | Desired number of columns. | `number` | 2 | | `spacing` | Gutter size of the column. The spacing is a multiplier of 1% of the available view. | `number` | 1 | +| `backgroundColor` | Defined a background color for the viewer | `string` | 2 | | `initialColToRender` | How many columns to render in the initial batch. | `number` | 2 | | `initialNumInColsToRender` | How many items to render in each column in the initial batch. | `number` | 2 | | `sorted` | Whether to sort the masonry data according to their index position or allow to fill in as soon as the `uri` is ready. | `Boolean` | false | @@ -425,7 +426,7 @@ Not sure where to start, or a beginner? Take a look at the [issues page](https:/ Contributors will be posted here. -
+
Eyal Abadi