SearchBar.js 847 Bytes
import React from 'react';
import {View} from 'react-native';
import { Searchbar } from 'react-native-paper';
import Icon from 'react-native-vector-icons/FontAwesome';

export default class SearchBar extends React.Component {
    state = {
        firstQuery: '',
    };

    render(){
        return(
            <View style={{flexDirection: 'row'}}>
                <Searchbar style={{flex: 0.9}}
                placeholder="검색할 질문을 입력하세요."
                onChangeText={query => { this.setState({ firstQuery: query }); }}
                value={this.state.firstQuery}
                />
                <View style={{flex:0.15,flexDirection: 'column', justifycontent:'center', alignItems:'center' }} >
                    <Icon name="bar-chart-o" size={30} />
                </View>
            </View>
        )
    }
}