Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react'
- import {
- ScrollView, View, TextInput, StyleSheet,
- } from 'react-native'
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- },
- box: {
- width: '100%',
- height: 200,
- },
- header: {
- height: 100,
- backgroundColor: '#7159c1',
- elevation: 10,
- borderBottomWidth: 2,
- borderBottomColor: '#fff',
- padding: 20,
- },
- input: {
- width: '100%',
- height: 50,
- backgroundColor: '#fff',
- },
- })
- const Teste3 = () => (
- <ScrollView style={styles.container} stickyHeaderIndices={[ 0, 4 ]}>
- <View style={styles.header}>
- <TextInput style={styles.input} placeholder="Pesquisa...." />
- </View>
- <View style={[ styles.box, { backgroundColor: 'orange' }]} />
- <View style={[ styles.box, { backgroundColor: 'green' }]} />
- <View style={[ styles.box, { backgroundColor: 'red' }]} />
- <View style={[ styles.box, { backgroundColor: 'blue' }]}>
- <TextInput style={styles.input} placeholder="Pesquisa...." />
- </View>
- <View style={[ styles.box, { backgroundColor: 'gray' }]} />
- <View style={[ styles.box, { backgroundColor: 'pink' }]} />
- <View style={[ styles.box, { backgroundColor: 'black' }]} />
- </ScrollView>
- )
- export default Teste3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement