From 26e040ea73a8b439add595f3500f0e4ddd6b100f Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Fri, 23 Oct 2020 06:44:04 -0700 Subject: [PATCH] Layout fix in searchable actions Summary: Tiny fix were horizontally aligned items were accidentally allowed to shrink by default. Reviewed By: cekkaewnumchai Differential Revision: D24501856 fbshipit-source-id: 30ad3987a744b14b41993ed27db9edadd420f0df --- desktop/app/src/ui/components/Layout.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/desktop/app/src/ui/components/Layout.tsx b/desktop/app/src/ui/components/Layout.tsx index 70e1745b1..fc8a13470 100644 --- a/desktop/app/src/ui/components/Layout.tsx +++ b/desktop/app/src/ui/components/Layout.tsx @@ -53,7 +53,14 @@ const Container = styled.div( }) => ({ display: 'flex', flexDirection: 'column', - flex: grow && shrink ? `1 1 0` : grow ? `1 0 auto` : shrink ? `0 1 0` : 0, + flex: + grow && shrink + ? `1 1 0` // allow growing, and shrinking smaller than actual size + : grow + ? `1 0 auto` // allow grow, start at natural size + : shrink + ? `0 1 0` // allow shrinking smaller than natural size + : `0 0 auto`, // (default) use natural size, don't grow or shrink (in parent flex direction) minWidth: shrink ? 0 : undefined, boxSizing: 'border-box', width,