` or even standard HTML like a `` or ``. However, if you want to use the flex-specific CSS properties for items within the container, like `flex` or `align-self`, you will need to use `FlexItem` to apply these properties.
-
-## Upgrading
-
-This component is a **breaking change** that replaces the [previous Flex component](https://www.npmjs.com/package/styled-flex-component). Use the following table as a guide to convert from the old properties to new `Flex` properties. Refer to [systemtheme.js](https://github.com/orchestrated-io/orcs-design-system/blob/master/packages/orcs-design-system/lib/systemtheme.js) for values.
-
-### `FlexItem` properties
-
-| **Old** | **New** |
-| ---------- | ---------------- |
-| `order` | `order` |
-| `basis` | `flexBasis` |
-| `grow` | `flexGrow` |
-| `shrink` | `flexShrink` |
-| `noShrink` | `flexShrink="0"` |
diff --git a/lib/components/Flex/index.js b/lib/components/Flex/index.js
index 30def5ee..cb8775c2 100644
--- a/lib/components/Flex/index.js
+++ b/lib/components/Flex/index.js
@@ -18,7 +18,7 @@ const FlexWrapper = styled("div")
: props["data-testid"]
? props["data-testid"]
: null
- }))(css({ boxSizing: "border-box" }), FlexStyles);
+ }))((props) => css({ boxSizing: "border-box", gap: props.gap }), FlexStyles);
const FlexItem = styled("div")(
css({
@@ -27,8 +27,12 @@ const FlexItem = styled("div")(
FlexStyles
);
-export default function Flex({ children, theme, ...props }) {
- const component = {children};
+export default function Flex({ children, gap, theme, ...props }) {
+ const component = (
+
+ {children}
+
+ );
if (theme) {
return (
@@ -47,6 +51,7 @@ export default function Flex({ children, theme, ...props }) {
Flex.propTypes = {
/** Children of `Flex` are taken as node elements */
children: PropTypes.node,
+ gap: PropTypes.string,
theme: PropTypes.object,
...styledPropTypes.space,
...styledPropTypes.layout,
diff --git a/package-lock.json b/package-lock.json
index c81e27f4..fd7c950e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "orcs-design-system",
- "version": "3.2.45",
+ "version": "3.2.46",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "orcs-design-system",
- "version": "3.2.45",
+ "version": "3.2.46",
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
diff --git a/package.json b/package.json
index 7372fbf4..54ac88ff 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "orcs-design-system",
- "version": "3.2.45",
+ "version": "3.2.46",
"engines": {
"node": "20.12.2"
},