Skip to content

Conversation

@sgny
Copy link
Collaborator

@sgny sgny commented May 30, 2019

Also added the relevant link to Style.md

@sgny sgny force-pushed the stylesheetdoc branch 2 times, most recently from 6b444c5 to 1a788ae Compare May 31, 2019 00:14
@sgny sgny requested a review from MoOx May 31, 2019 01:54
@sgny sgny force-pushed the stylesheetdoc branch 2 times, most recently from 553ab75 to ab1f95f Compare May 31, 2019 02:23
cknitt
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`).
Copy link
Member

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.)

Copy link
Collaborator Author

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)
```
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

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.

@sgny sgny force-pushed the stylesheetdoc branch 2 times, most recently from 347efd5 to 7185d4a Compare May 31, 2019 18:11
@sgny sgny force-pushed the stylesheetdoc branch from 7185d4a to 9196f63 Compare May 31, 2019 18:13
@MoOx MoOx merged commit 69a83fb into rescript-react-native:master May 31, 2019
@MoOx
Copy link
Member

MoOx commented May 31, 2019

👍

@sgny sgny deleted the stylesheetdoc branch June 9, 2019 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants