Skip to content
This repository was archived by the owner on Apr 11, 2025. It is now read-only.

Commit 363da8a

Browse files
committed
✨ feat: 新增 flex api
1 parent de94cfc commit 363da8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/layout-kit/src/Flexbox.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export interface IFlexbox {
2626
width?: number | string;
2727
height?: number | string;
2828
padding?: string | number | CommonSpaceNumber;
29+
flex?: number | string;
2930
/**
3031
* 是否隐藏内容
3132
*/
@@ -41,6 +42,8 @@ export const Flexbox: FC<FlexboxProps> = styled.div.attrs(() => ({
4142
// 是否显示
4243
display: ${(props) => (props.hidden ? 'none' : 'flex')};
4344
45+
flex: ${(props) => props.flex};
46+
4447
flex-direction: ${(props) => {
4548
return getFlexDirection(props.direction, props.horizontal);
4649
}};

0 commit comments

Comments
 (0)