Skip to content

Commit

Permalink
docs: Adding <Text> to avoid errors (callstack#1124)
Browse files Browse the repository at this point in the history
* Adding <Text> to avoid errors

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.

* docs: importing <Text> from react-native-paper
  • Loading branch information
rodriigovieira authored and ferrannp committed Jun 14, 2019
1 parent 3b19f18 commit f266ca1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Dialog/DialogScrollArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Props = React.ElementConfig<typeof View> & {
* ```js
* import * as React from 'react';
* import { ScrollView } from 'react-native';
* import { Dialog, Portal } from 'react-native-paper';
* import { Dialog, Portal, Text } from 'react-native-paper';
*
* export default class MyComponent extends React.Component {
* state = {
Expand All @@ -37,7 +37,7 @@ type Props = React.ElementConfig<typeof View> & {
* onDismiss={this._hideDialog}>
* <Dialog.ScrollArea>
* <ScrollView contentContainerStyle={{ paddingHorizontal: 24 }}>
* This is a scrollable area
* <Text>This is a scrollable area</Text>
* </ScrollView>
* </Dialog.ScrollArea>
* </Dialog>
Expand Down

0 comments on commit f266ca1

Please sign in to comment.