From 363da8ae6fe3719b71e9115a9f220f446cc1b76c Mon Sep 17 00:00:00 2001 From: arvinxx Date: Mon, 28 Mar 2022 22:35:26 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20feat:=20=E6=96=B0=E5=A2=9E=20flex?= =?UTF-8?q?=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/layout-kit/src/Flexbox.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/layout-kit/src/Flexbox.tsx b/packages/layout-kit/src/Flexbox.tsx index b326ad48..05c89fed 100644 --- a/packages/layout-kit/src/Flexbox.tsx +++ b/packages/layout-kit/src/Flexbox.tsx @@ -26,6 +26,7 @@ export interface IFlexbox { width?: number | string; height?: number | string; padding?: string | number | CommonSpaceNumber; + flex?: number | string; /** * 是否隐藏内容 */ @@ -41,6 +42,8 @@ export const Flexbox: FC = styled.div.attrs(() => ({ // 是否显示 display: ${(props) => (props.hidden ? 'none' : 'flex')}; + flex: ${(props) => props.flex}; + flex-direction: ${(props) => { return getFlexDirection(props.direction, props.horizontal); }};