From 9111b66916ed29b860ce6545f13b133d4da16226 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Thu, 26 May 2022 04:26:20 -0700 Subject: [PATCH] Document Container grow / shrink properties Summary: For some reason, the most important container property grow (and shrink) wasn't in the docs. Added that Reviewed By: antonk52 Differential Revision: D36697072 fbshipit-source-id: 45dd0351e2a94d31972d57a9f006cd06a0d37c4e --- .../src/sandy-chrome/DesignComponentDemos.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/desktop/flipper-ui-core/src/sandy-chrome/DesignComponentDemos.tsx b/desktop/flipper-ui-core/src/sandy-chrome/DesignComponentDemos.tsx index ee888e728..774939375 100644 --- a/desktop/flipper-ui-core/src/sandy-chrome/DesignComponentDemos.tsx +++ b/desktop/flipper-ui-core/src/sandy-chrome/DesignComponentDemos.tsx @@ -77,6 +77,16 @@ const demos: PreviewProps[] = [ title: 'Layout.Container', description: `Layout.Container can be used to organize the UI in regions. It takes care of paddings and borders. Children will be arranged vertically. Use Layout.Horizontal instead for arranging children horizontally. If you need a margin on this component, try to wrap it in other Layout component instead.`, props: [ + [ + 'grow', + 'boolean (false)', + "Should the container use all available size (true), or rather take the size of it's content? (false).", + ], + [ + 'shrink', + 'boolean (false)', + 'Is the container allowed to become smaller than the space the children need? If e.g. text content needs to be ellipsed, this should be set to true', + ], ['rounded', 'boolean (false)', 'Make the corners rounded'], [ 'padv / padh / pad',