Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gridRowStyle and gridColumnStyle props #158

Merged
merged 2 commits into from
Jan 18, 2022

Conversation

pdpino
Copy link
Collaborator

@pdpino pdpino commented Jan 5, 2022

Fixes #43, fixes #138, fixes #156

  • Add gridRowStyle and gridColumnStyle props, to modify grid horizontal and vertical lines (separated). Usage:
    gridRowStyle={{ borderTopWidth: <width>, borderColor: <color> }} // horizontal lines width and color
    gridColumnStyle={{ borderLeftWidth: <width>, borderColor: <color> }} // vertical lines width and color
  • I removed an extra <View/> element, for simplicity

I'm not sure the props I chose are the best option, lmk if you think there are better options

@pdpino
Copy link
Collaborator Author

pdpino commented Jan 5, 2022

Other prop options I thought:

  1. two props gridLineWidth and gridLineColor, but this does not discriminate between horizontal and vertical lines (issue It is possible to show only horizontal grid lines and hide vertical grid lines and also make size of lines bigger? #156)
  2. four props horizontalLineWidth, verticalLineWidth, horizontalLineColor, verticalLineColor, but they are too many props (?)
  3. (I chose this) two props gridRowStyle and gridColumnStyle, allow passing more styles if necessary (in the future), though users could break stuff (if passing flex: 2, for example)

@pdpino pdpino added enhacement-styles type: feature enhancements or new features labels Jan 5, 2022
@hoangnm
Copy link
Owner

hoangnm commented Jan 18, 2022

Thank @pdpino , I think this is a good option. LGTM.

@hoangnm hoangnm merged commit af133d0 into hoangnm:master Jan 18, 2022
@pdpino pdpino deleted the feature/grid-color branch February 22, 2022 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature enhancements or new features
Projects
None yet
2 participants