xotahal / react-native-material-ui

Highly customizable material design components for React Native
MIT License
3.78k stars 609 forks source link

Centering Title moves Search bar #437

Closed asp3 closed 5 years ago

asp3 commented 5 years ago

I was trying to center the text for the toolbar title, however moving the center element makes the search bar area start where the center title begins (in this example, it moves it to the left by 20 pixels) centerElement={ <Text style={{ color: "#000000", paddingTop: 8, marginLeft: 20 justifyContent: "center", alignItems: "center", fontSize: 25, flex: 1, flexDirection: "row" }}> Notebook </Text> } searchable={{ autoFocus: true, placeholder: "Search", onSearchClosed: () => { navigation.getParam("unfilterNotes")(); navigation.setParams({ searchPressed: false }); }, onSearchPressed: () => { navigation.setParams({ searchPressed: true }); }, onChangeText: navigation.getParam("filterNotes") }}

asp3 commented 5 years ago

fixed w textalign