There is not plenty of space to use in Header - title
See original GitHub issueHey guys, I have reviewed some issues related with this problem, but in all cases people are using a short text. I’m no able to change the width of the Title within the Body component. There is plenty of space to use, but the Body component is using a very small portion of the available width.
Also in IOS: if I dont use a right button, the text gets lost:
react-native, react and native-base version
"react-native": "0.55.1",
"native-base": "^2.4.5",
Expected behaviour
To be able to use more width within the Body component, and align the text when there is not right button in IOS
Actual behaviour
Not using plenty of space available for the title and the alignment when there is not right button gets lost
Steps to reproduce (code snippet or screenshot)
const buildHomeBtn = navigation => {
return (
<Left>
<Button transparent onPress={() => navigation.navigate('PatientHome')}>
<Icon name='ios-home-outline' style={{ color: PRIMARY_DARK }} />
</Button>
</Left>
)
}
const buildLeftArrowIcon = leftIconHandler => {
console.log('leftIconHandler', leftIconHandler)
return (
<Left>
<Button transparent onPress={leftIconHandler}>
<Icon name='ios-arrow-back' style={{ color: PRIMARY_DARK }} />
</Button>
</Left>
)
}
const buildRightSideIcon = navigation => {
return (
<Right>
<Button transparent onPress={() => navigation.navigate('DrawerOpen')}>
<Icon name='menu' style={{ color: PRIMARY_DARK }} />
</Button>
</Right>
)
}
<Header style={typo.bgWhite}
androidStatusBarColor={getStatusBarColor(statusBarColor)}
iosBarStyle='light-content'>
{leftIconType === 'home' ? buildHomeBtn(navigation) : buildLeftArrowIcon(leftIconClickHandler)}
<Body>
<Title style={{ color:'blue', fontSize: 16 }}> RESUMEN DEL SERVICIO </Title>
</Body>
{showRightIcon ? buildRightSideIcon(navigation) : null}
</Header>
Is the bug present in both ios and android or in any one of them?
both
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How to reduce space before and after title / header text - Support
In order for pages to be structured properly, all elements must receive some type of margin or padding for adequate spacing. While this...
Read more >How to remove the default Navigation Bar space in SwiftUI ...
You can hide both navigation title and back button by hiding the whole toolbar. You can show also choose to show it in...
Read more >Five Essential Tips for APA Style Headings
The heading levels in your first question look fine. However, you do not need to double space around headings. Just use a regular...
Read more >How to Write a Résumé Header: What to Include and Examples
7. Use white space effectively. Make sure your header — and your résumé as a whole, for that matter — contains plenty of...
Read more >Video: Headers, margins and more - Microsoft Support
Training: This video tutorial shows you how to add headers and footers such as ... You can add a lot to your document...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I solved the truncated titles by putting
style={{ flex: 2 }}
on the<Body>
tagDid anyone find a solution for this? I’m having the same issue. I’m using all three components
Left
/Body
/Right
and all of them seem to be cutting off like there’s not enough room when really there is plenty of space.