2

I can't seem to get my title text to wrap:

enter image description here

I'm using native-base

let SearchPage = (props) => {
  const menu = (
    <Container>
      <Header style={styles.header}>
        <Left>
          <Button transparent onPress={props.togglePageMenu}>
            <Icon name='menu' />
          </Button>
        </Left>
        <Body>
          <Title style={styles.title} numberOfLines={2}>Search Products</Title>
        </Body>
        <Right>
        </Right>
      </Header>...

styles...:

      title: {
        flexWrap:'wrap',
        flex: 1,
        color: '#9E9E9E',
        fontWeight: '200',
        fontSize: 19
      },
  header: {
    backgroundColor: '#F7F7F7'
  },

What am I doing wrong?

1
  • use alignItems: 'flex-start' instead of flexWrap:'wrap' Commented May 13, 2017 at 21:15

1 Answer 1

1

I had to stop using <Title> from Native Base and instead use <Text> from Native Base. I guess Title has some behind the scenes styles that prevent it from wrapping.

Sign up to request clarification or add additional context in comments.

1 Comment

did you try wrap with alignitems?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.