-
-
Notifications
You must be signed in to change notification settings - Fork 149
Add documentation for StyleSheet API #520
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
Conversation
6b444c5
to
1a788ae
Compare
553ab75
to
ab1f95f
Compare
### `flatten` | ||
|
||
Takes an array of styles (of type `Style.t`) and returns a single style (also of | ||
type `Style.t`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added such comments
|
||
```reason | ||
create: Js.t('a) => Js.t('a) | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
👍 |
Also added the relevant link to
Style.md