Skip to content

Commit

Permalink
✨ feat: 新增 flex api
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Mar 28, 2022
1 parent de94cfc commit 363da8a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/layout-kit/src/Flexbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface IFlexbox {
width?: number | string;
height?: number | string;
padding?: string | number | CommonSpaceNumber;
flex?: number | string;
/**
* 是否隐藏内容
*/
Expand All @@ -41,6 +42,8 @@ export const Flexbox: FC<FlexboxProps> = styled.div.attrs(() => ({
// 是否显示
display: ${(props) => (props.hidden ? 'none' : 'flex')};
flex: ${(props) => props.flex};
flex-direction: ${(props) => {
return getFlexDirection(props.direction, props.horizontal);
}};
Expand Down

0 comments on commit 363da8a

Please sign in to comment.