Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more descriptive prop name should be used for the MasonryList layout portion. Something like masonryBackgroundColor.

| `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 |
Expand Down Expand Up @@ -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.

<br/>
<br/> Eyal Abadi
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A 100x100px circle photo of your choosing should be added to the Contributors section.

Example:

<a href="https://www.facebook.com/lue.hang">
<img src="www.hosting.com/profile-circle-75px.png"/>
</a>

If you want me to host a picture, then I can edit this section. Just send me the picture and your preferred href.

<br/>
<br/>

Expand Down
4 changes: 2 additions & 2 deletions src/MasonryList/Column.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"
}}>
<FlatList
Expand Down
4 changes: 2 additions & 2 deletions src/MasonryList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -171,7 +171,7 @@ export default class MasonryList extends React.Component {
return (
<View style={{flex: 1}} onLayout={(event) => this._setParentDimensions(event)}>
<FlatList
style={{padding: (this.state.dimensions.width / 100) * this.props.spacing / 2, backgroundColor: "#fff"}}
style={{padding: (this.state.dimensions.width / 100) * this.props.spacing / 2, backgroundColor: this.props.backgroundColor}}
contentContainerStyle={{
justifyContent: "space-between",
flexDirection: "row",
Expand Down