Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When parts of the hierarchy are toggled not all properties update. #22

Open
sorskoot opened this issue Nov 26, 2024 · 0 comments
Open

Comments

@sorskoot
Copy link
Contributor

In the piece of code below, when isOn is true, A should be left aligned. When isOn is false B should be centered. B is left aligned now. The markup below works, because if you add an ! before isOn the result is flipped and B is centered. But then A is incorrect.

                {isOn ? (
                    <Container
                        height={70}
                        marginTop={10}
                        justifyContent={Justify.SpaceBetween}
                        flexDirection={FlexDirection.Row}
                    >
                        <Text>
                            A
                        </Text>
                    </Container>
                ) : (
                    <Container
                        height={75}
                        alignContent={Align.FlexStart}
                        padding={10}
                    >
                        <Text fontSize={20} textAlign="center">
                            B
                        </Text>
                    </Container>
                )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant