Flex component props not working as expected
See original GitHub issueDescribe 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:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top 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 >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
There is no
flexDirection
prop. If you’ve seen this in the docs somewhere, could you please point it out?@lachlanjc i think it does? https://theme-ui.com/components/box