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

docs: Adding <Text> to avoid errors #1124

Merged
merged 2 commits into from
Jun 14, 2019
Merged

Conversation

rodriigovieira
Copy link
Contributor

@rodriigovieira rodriigovieira commented Jun 10, 2019

The change

Add a <Text> in the documentation of the Dialog.ScrollArea to avoid errors while copying without making changes.

When copying the code and trying it in the editor, an error is returned, demanding that the "This is a scrollable area" text be wrapped in a <Text> component.

Although in most cases the scrollable content won't be a <Text> component, I think it would nice to do something to avoid the error. As an alternative, a <View> with a few <Text> inside could be added.

Motivation

By fixing this, it'll avoid errors by beginners or by someone who's just copying the code and trying to check things out, avoiding the unnecessary trouble.

When copying the code and trying in the editor, an error is returning, demanding that the "This is a scrollable area" text be wrapped in a `<Text>` component.
@callstack-bot
Copy link

callstack-bot commented Jun 10, 2019

Hey @rodriigovieira, thank you for your pull request 🤗. The documentation from this branch can be viewed here. Please remember to update Typescript types if you changed API.

@rodriigovieira rodriigovieira changed the title Adding <Text> to avoid errors docs: Adding <Text> to avoid errors Jun 10, 2019
@ferrannp
Copy link
Collaborator

@rodriigovieira can you import Text from react-native-paper ? :)

@rodriigovieira
Copy link
Contributor Author

I just did. Did I do it correctly?

@ferrannp
Copy link
Collaborator

Yup, thank you!

@ferrannp ferrannp merged commit f266ca1 into callstack:master Jun 14, 2019
@rodriigovieira rodriigovieira deleted the patch-1 branch June 14, 2019 16:46
@rodriigovieira rodriigovieira restored the patch-1 branch June 14, 2019 16:46
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.

None yet

3 participants