Skip to content

ListItem.Content alignment of elements is off #3651

Answered by markl-vesper
markl-vesper asked this question in Q&A
Discussion options

You must be logged in to vote

And the answer is to not include the both the right hand side and the icon in the same code and return the appropriate one conditionally. I guess it must of been rendering both items

    return icon ? (
        <ListItem topDivider>
            <ListItem.Content>
                <ListItem.Title>
                    <Text>{title}</Text>
                </ListItem.Title>
            </ListItem.Content>
            <ListItem.Content>
            <Icon name={icon} color={color} type={'material-community'}/>
            </ListItem.Content>
        </ListItem>
    ) : (
        <ListItem topDivider>
            <ListItem.Content>
                <ListItem.Title>
                    <Text>{title…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by markl-vesper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant