Add documentation for StyleSheet API#520
Merged
MoOx merged 1 commit intorescript-react-native:masterfrom May 31, 2019
Merged
Conversation
6b444c5 to
1a788ae
Compare
553ab75 to
ab1f95f
Compare
cknitt
previously approved these changes
May 31, 2019
| ### `flatten` | ||
|
|
||
| Takes an array of styles (of type `Style.t`) and returns a single style (also of | ||
| type `Style.t`). |
Member
There was a problem hiding this comment.
Maybe add a comment that using styles created with Style.array in StyleSheet.create will lead to a runtime error, so StyleSheet.flatten must be used in that case. (Style.array is fine for passing styles to component props though.)
MoOx
reviewed
May 31, 2019
MoOx
reviewed
May 31, 2019
|
|
||
| ```reason | ||
| create: Js.t('a) => Js.t('a) | ||
| ``` |
Member
There was a problem hiding this comment.
Collaborator
Author
There was a problem hiding this comment.
Perhaps we revisit this issue later, but I don't think there is a way to exclude array(Style.t) without a lot of pain elsewhere.
347efd5 to
7185d4a
Compare
MoOx
approved these changes
May 31, 2019
Member
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also added the relevant link to
Style.md