bluejoyq

add searchBar

{
"devToolsPort": 19002,
"expoServerPort": 19000,
"packagerPort": 19001,
"packagerPid": 25640,
"packagerPort": null,
"packagerPid": null,
"expoServerNgrokUrl": "https://ep-ukj.anonymous.searchguide.exp.direct",
"packagerNgrokUrl": "https://packager.ep-ukj.anonymous.searchguide.exp.direct",
"ngrokPid": 23544
"ngrokPid": 28468
}
......
import React from 'react';
import AppContainer from './components/AppContainer/AppContainer';
import SafeAreaView from 'react-native-safe-area-view';
import SearchBar from './components/SearchBar/SearchBar';
export default class App extends React.Component {
constructor(props){
......@@ -11,7 +12,12 @@ export default class App extends React.Component {
}
render(){
return (
<AppContainer ></AppContainer>
<>
<SearchBar />
<SafeAreaView style={{flex: 1, backgroundColor:'#eee'}}>
<AppContainer />
</SafeAreaView>
</>
)
}
}
\ No newline at end of file
......
......@@ -4,6 +4,9 @@
"slug": "searchGuide",
"privacy": "public",
"sdkVersion": "35.0.0",
"androidStatusBar": {
"backgroundColor": "#226557"
},
"platforms": [
"ios",
"android",
......
import React from 'react';
import {createAppContainer} from 'react-navigation';
import {createMaterialTopTabNavigator} from 'react-navigation-tabs';
import { StatusBar } from 'react-native';
import Home from '../Home/Home';
import Rate from '../Rate/Rate';
......
......@@ -12,7 +12,7 @@ class Rate extends React.Component {
static navigationOptions={
title:'평가',
tabBarIcon: ({tintColor})=> (<Icon name="bar-chart-o" color={tintColor} style={{marginLeft:1}} size={20} />),
tabBarIcon: ({tintColor})=> (<Icon name="bar-chart-o" color={tintColor} style={{marginLeft:0.5}} size={20} />),
}
render() {
......
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>
)
}
}
\ No newline at end of file
......@@ -5566,6 +5566,11 @@
"resolved": "https://registry.npmjs.org/react-native-view-shot/-/react-native-view-shot-2.6.0.tgz",
"integrity": "sha512-yO9vWi/11m2hEJl8FrW1SMeVzFfPtMKh20MUInGqlsL0H8Ya2JGGlFfrBzx1KiFR2hFb5OdsTLYNtcVZtJ6pLQ=="
},
"react-native-voice": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/react-native-voice/-/react-native-voice-0.3.0.tgz",
"integrity": "sha512-puSrXCNn1MM03UZkY8q+GW931OqBCEBCiupNK4vD8i49esGqRDDmzv8sRYyEgXj5ScVDKe6lnlKCmJSn5Wo2UA=="
},
"react-native-web": {
"version": "0.11.7",
"resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.11.7.tgz",
......
......@@ -17,6 +17,7 @@
"react-native-navigation": "^3.6.0",
"react-native-paper": "^3.2.1",
"react-native-reanimated": "^1.4.0",
"react-native-voice": "^0.3.0",
"react-native-web": "^0.11.7",
"react-navigation": "^4.0.10",
"react-navigation-material-bottom-tabs": "^2.1.5",
......