react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Appbar content Left

Open marijang opened this issue 1 year ago • 2 comments

Hey, i m trying to set content or title on the left and actions on the right side. But i m getting on ios title on center icons on left as suppose but i want to title to be on left corner.

So i put dummy back action and now works but this is workaround....

<Appbar.Header> <Appbar.Content title={ <Text variant="headlineSmall" style={globalStyle.weight600}> {title} </Text> } style={{alignItems: "flex-start"} /> <Appbar.Action icon={AddBox} onPress={() => { router.push(CreateEventNavigationConstant.What); }} /> <Appbar.Action icon={Bell} onPress={() => {}} /> </Appbar.Header>

i want actually this: Uploading Screenshot 2024-03-11 at 11.18.51.png…

marijang avatar Mar 11 '24 10:03 marijang

I digged into the code a bit to find out that on ios, it is assumed that you wish the title to be centered. (see here)

If you set <Appbar.Header mode="small">, it will actually make the title to the left on ios.

@lukewalczak is there any particular reasons for a different default value on ios? is this part of the MD guidelines? It feels quite counter-intuitive imo.

ycmjason avatar Jul 03 '24 22:07 ycmjason