Skip to content
Prev Previous commit
Next Next commit
Update example with images
  • Loading branch information
andresain123 committed Jun 22, 2020
commit 7ad82b6723656a1b5c396e8bbb446d71fe5f9c65
Binary file added example/assets/images/user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/user@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/user@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 16 additions & 3 deletions example/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,24 @@ export default class App extends React.Component<{}, $FlowFixMeState> {
return (
<ScrollView contentContainerStyle={styles.container}>
<View style={styles.segmentContainer}>
<Text style={styles.text}>Segmented controls can have values</Text>
<SegmentedControl values={['One', 'Two']} />
<Text style={styles.text}>
Segmented controls can have values and images
</Text>
<SegmentedControl
values={['One', 'Two', require('../assets/images/user.png')]}
/>
</View>
<View style={styles.segmentSection}>
<SegmentedControl values={['One', 'Two', 'Three', 'Four', 'Five']} />
<SegmentedControl
values={[
'One',
'Two',
require('../assets/images/user.png'),
'Three',
'Four',
'Five',
]}
/>
</View>
<View style={styles.segmentSection}>
<Text style={styles.text}>
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3225,11 +3225,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.8.tgz#1d590429fe8187a02707720ecf38a6fe46ce294b"
integrity sha512-6XzyyNM9EKQW4HKuzbo/CkOIjn/evtCmsU+MUM1xDfJ+3/rNjBttM1NgN7AOQvN6tP1Sl1D1PIKMreTArnxM9A==

"@types/node@^14.0.13":
version "14.0.13"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.13.tgz#ee1128e881b874c371374c1f72201893616417c9"
integrity sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA==

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
Expand Down