Skip to content

Commit

Permalink
🩹 fix container flex
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineKM committed Apr 2, 2023
1 parent 9ca6b7a commit bd30326
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/proud-poets-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tonightpass/kitchen": patch
---

Fix `Container` flex
5 changes: 5 additions & 0 deletions .changeset/thick-games-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tonightpass/kitchen": minor
---

Add `Box` HOC
5 changes: 2 additions & 3 deletions packages/kitchen/src/components/Container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ const Container = styled(
flex-direction: ${(props) =>
(props.direction && props.direction[props.direction.length - 1]) ||
(props.row ? "row" : "column")};
position: relative;
max-width: 100%;
flex: ${(props) => (props.flex !== undefined ? props.flex : 1)};
${(props) => props.flex && `flex: ${props.flex};`}
justify-content: ${(props) => props.justify || "flex-start"};
align-items: ${(props) => props.align || "stretch"};
${(props) =>
props.gap &&
`gap: ${props.theme.gap[props.gap as keyof Gap] || `${props.gap}px`};`}
Expand Down

0 comments on commit bd30326

Please sign in to comment.