From 5f219d97e08568371790f5475deff622af6af55f Mon Sep 17 00:00:00 2001 From: snowingfox <1503401882@qq.com> Date: Fri, 10 May 2024 18:32:53 +0800 Subject: [PATCH] feat: init props --- components/flex/index.tsx | 5 +++++ components/flex/interface.ts | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/components/flex/index.tsx b/components/flex/index.tsx index 1b0b5b83b4..af9aeaa9f1 100644 --- a/components/flex/index.tsx +++ b/components/flex/index.tsx @@ -20,9 +20,14 @@ const Flex = React.forwardRef((props, ref) => { children, vertical = false, component: Component = 'div', + columns, + spacing, + sequential = false, ...othersProps } = props; + console.log(columns, spacing, sequential); + const { flex: ctxFlex, direction: ctxDirection, diff --git a/components/flex/interface.ts b/components/flex/interface.ts index d2d5f8d864..bc94560353 100644 --- a/components/flex/interface.ts +++ b/components/flex/interface.ts @@ -14,4 +14,12 @@ export interface FlexProps

extends React.HTMLAttributes; + columns?: number; + spacing?: number; + /** + * Allows using sequential order rather than adding to shortest column + * + * @default false + */ + sequential?: boolean; }