question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flex component props not working as expected

See original GitHub issue

Describe the bug Flex component does not accept flexDirection prop

To Reproduce

/** @jsx jsx */
import { jsx } from "theme-ui";
import React from "react";
import { Flex } from "@theme-ui/components";

export default () => {
  return (
    <Flex flexDirection="column">
      <Box p={3} width={1 / 2} color="white" bg="primary">
        Flex
      </Box>
      <Box p={3} width={1 / 2} color="white" bg="secondary">
        Box
      </Box>
    </Flex>
  );
};

Expected behavior children of Flex component should be displayed in column format when flexDirection="column" is added to component.

Screenshots n/a

Additional context this works when using long form in the sx prop, expect to be able to use the props directly on Flex

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jxnblkcommented, Jan 6, 2020

There is no flexDirection prop. If you’ve seen this in the docs somewhere, could you please point it out?

1reaction
denu5commented, Apr 15, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS Flex property not working with my React Component
All have done is just not working have used almost all the flex property and yet it seems not to be working. My...
Read more >
Troubleshooting | React Navigation
Troubleshooting. This section attempts to outline issues that users frequently encounter when first getting accustomed to using React Navigation.
Read more >
Layout Props - React Native
When flex is -1, the component is normally sized according to width and height . However, if there's not enough space, the component...
Read more >
Work with Components and Props - Twilio Flex
Importing and using an existing component (e.g. MessagingCanvas ) and adding your own values for their props is not supported and may result...
Read more >
The `sx` Prop - Theme UI
Because MDX uses its own custom pragma and createElement function, the Theme UI pragma will not work in MDX files. You can use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found